LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default Visual Studio 2010 (Creating Excel DLL) "warning" no build

Visual Studio 2010 Beta

Attempting to build an Excel DLL with Visual Studio.

Did use Chip Pearson template but apparently 2010 may have changed the process.

Example of Division.vb

Option Explicit On
Option Compare Text
Option Strict Off
Imports XL = Microsoft.Office.Interop.Excel
Imports OFC = Microsoft.Office.Interop
Imports System
Imports System.Runtime.InteropServices
Imports Microsoft.Win32


<ClassInterface(ClassInterfaceType.AutoDual), ComVisible(True) Public _
Class Division

Public Function DivideBy2(ByVal D As Double) As Double
Return D / 2
End Function

Public Function DivideBy4(ByVal D As Double) As Double
Return D / 4
End Function

<ComRegisterFunctionAttribute() Public Shared Sub RegisterFunction(ByVal type As Type)
Registry.ClassesRoot.CreateSubKey(GetSubkeyName(ty pe))
End Sub

<ComUnregisterFunctionAttribute() Public Shared Sub UnregisterFunction(ByVal type As Type)
Registry.ClassesRoot.DeleteSubKey(GetSubkeyName(ty pe), False)
End Sub

Private Shared Function GetSubkeyName(ByVal type As Type) As String
Dim S As New System.Text.StringBuilder()
S.Append("CLSID\{")
S.Append(type.GUID.ToString().ToUpper())
S.Append("}\Programmable")
Return S.ToString()
End Function

End Class


------ Build started: Project: MathNET, Configuration: Debug x86 ------
vbc : warning BC40059: A reference was created to interop assembly
'Microsoft.Office.Interop.Excel' because of an indirect reference created
by assembly 'Microsoft.Office.Tools.Excel.v9.0'. Consider linking assembly
'Microsoft.Office.Tools.Excel.v9.0'.
vbc : warning BC40059: A reference was created to interop assembly
'Microsoft.Vbe.Interop' because of an indirect reference created by
assembly 'Microsoft.Office.Tools.Excel.v9.0'. Consider linking assembly
'Microsoft.Office.Tools.Excel.v9.0'.
vbc : warning BC40059: A reference was created to interop assembly 'office'
because of an indirect reference created by assembly
'Microsoft.Office.Tools.Common.v9.0'. Consider linking assembly
'Microsoft.Office.Tools.Common.v9.0'.
vbc : warning BC40059: A reference was created to interop assembly 'office'
because of an indirect reference created by assembly 'Microsoft.Office.Tools.Excel.v9.0'.
Consider linking assembly 'Microsoft.Office.Tools.Excel.v9.0'.

Build started 5/27/2009 1:06:15 PM.

CoreResGen:
Processing resource file "My Project\Resources.resx" into
"obj\x86\Debug\MathNET.Resources.resources".
CopyFilesToOutputDirectory:
Copying file from "obj\x86\Debug\MathNET.dll" to "bin\Debug\MathNET.dll".
MathNET - C:\MathNETFunctionLibrary\MathNET\bin\Debug\MathNE T.dll
Copying file from "obj\x86\Debug\MathNET.pdb" to "bin\Debug\MathNET.pdb".
c:\Windows\Microsoft.NET\Framework\v4.0.20506\Micr osoft.Common.targets(3171,9): error MSB3216:

Cannot register assembly "C:\MathNETFunctionLibrary\MathNET\bin\Debug\MathN ET.dll" - access denied.
Please make sure you're running the application as administrator. Access to the registry key
'HKEY_CLASSES_ROOT\MathNET.Division' is denied.

Build FAILED.

Time Elapsed 00:00:01.20
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I have no experience in "linking 'Microsoft.Office.Tools.Excel.v9.0' -or-
'Microsoft.Office.Tools.Common.v9.0'.

MY best guess is that the Declarations in the Visual Basic need to change from:

Imports XL = Microsoft.Office.Interop.Excel
Imports OFC = Microsoft.Office.Interop
Imports System
Imports System.Runtime.InteropServices
Imports Microsoft.Win32

To: Pure guess which does Not work

Imports XL = Microsoft.Office.Interop.Excel.VB.9.0
Imports OFC = Microsoft.Office.Interop VB.9.0
Imports System
Imports System.Runtime.InteropServices
Imports Microsoft.Win32

Bottom line:

The error message states: Consider linking assembly 'Microsoft.Office.Tools.Excel.v9.0'
If I wanted to attempt the linking, here and how do I do it?

Thanks in advance, EagleOne
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I stop getting the "privacy warning" messagein Excel 2007? Parkhead Excel Discussion (Misc queries) 0 November 17th 08 03:08 AM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
how to build a "theorem prover" in Excel socrates Excel Worksheet Functions 3 July 1st 08 04:59 AM
How to stop warning message in Excel "initialize ActiveX controls" Sya Excel Programming 1 April 27th 06 10:14 AM
Email from Excel; MS warning "program is trying to send mail on your behalf" KR Excel Programming 2 July 11th 05 05:00 PM


All times are GMT +1. The time now is 04:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"