.NET
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
VS 2010
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Please don't tell me you can't run/use Visual Studio 2010 stuff inside AutoCAD 2011?.......
"Swing hard and hope you hit it!"
Re: VS 2010
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I have done a couple of small AutoCAD 2011 (AcadMap, actually) projects with VS2010, trageting .NET4.0. No issue so far.
Of course I had to add this into acad.exe.config:
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
...
</configuration>
Re: VS 2010
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
You can't run Visual Studio 2010 stuff inside AutoCAD 2011, but you can use Visual Studio 2010 to develop apps for 2011, 2010, 2009, and how ever far it goes back.
Re: VS 2010
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Really no issues with 4.0 you must not be using any new features in 4.0 that directly interact with AutoCAD. Then I would play it safe with 3.5
Re: VS 2010
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
My acad.exe.config.....contains what you state below.
However, I tried running a sample .DLL (sample taken from AutoCAD (2010) .Net Developers Guide), and I get the following errors:
Command: netload
Cannot load assembly. Error details: System.BadImageFormatException: Could not
load file or assembly 'file:///D:\My Documents\Visual Studio
2010\Projects\MyFirstProject\MyFirstProject\obj\De
one of its dependencies. This assembly is built by a runtime newer than the
currently loaded runtime and cannot be loaded.
File name: 'file:///D:\My Documents\Visual Studio
2010\Projects\MyFirstProject\MyFirstProject\obj\De
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase,
Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark,
Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase,
Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark,
Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyNa
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile, Evidence
securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm,
Boolean forIntrospection, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(Stri
at loadmgd()
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure
logging.
To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog].
Any ideas?
attached is my acad.exe.config file (renamed so I could attach)
"Swing hard and hope you hit it!"
Re: VS 2010
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
1. Do you use Acad2011?
2. In your attached acad.exe.config, you have <!--....--> that comments out the needed setting. Are you sure you do not have <!-- ... --> in your real acad.exe.config?
Re: VS 2010
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thx....that fixed the problem (I had the required line commented out...jeeez!)
"Swing hard and hope you hit it!"
Re: VS 2010
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
HI I have the same problem which is stated earlier. When I try to to load the .dll show following error:
Command: netload
Cannot load assembly. Error details: System.BadImageFormatException: Could not
load file or assembly 'file://\\home003.vih.infineon.com\alamzaki\My
Documents\Visual Studio
2010\Projects\MyFirstProject\MyFirstProject\bin\De
one of its dependencies. This assembly is built by a runtime newer than the
currently loaded runtime and cannot be loaded.
File name: 'file://\\home003.vih.infineon.com\alamzaki\My Documents\Visual
Studio 2010\Projects\MyFirstProject\MyFirstProject\bin\De
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase,
Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark,
Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase,
Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark,
Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyNa
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile, Evidence
securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm,
Boolean forIntrospection, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(Stri
at loadmgd()
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure
logging.
To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog].
MY acad.exe.config file is:
<configuration>
<configSections>
<section name="microsoft.web.services3" type="Microsoft.Web.Services3.Configuration.WebSer
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
-->
<!--All assemblies in AutoCAD are fully trusted so there's no point generating publisher evidence-->
<runtime>
<generatePublisherEvidence enabled="false"/>
</runtime>
<appSettings>
<add key="WebServiceTimeout" value="1000000"/></appSettings><microsoft.web.serv
<messaging>
<maxMessageLength value="51200"/><mtom clientMode="On"/></messaging><security>
<timeToleranceInSeconds value="86400"/></security></microsoft.web.services
<add fileName="rolling.log" rollSizeKB="0" timeStampPattern="yyyy-MM-dd" rollFileExistsBehavior="Increment" rollInterval="Day" formatter="Text Formatter" header="" footer="----------------------------------------" listenerDataType="Microsoft.Practices.EnterpriseLi
<add template="{timestamp} ({win32ThreadId}) {message}
Category: {category}{dictionary(
{key}: {value})}" type="Microsoft.Practices.EnterpriseLibrary.Loggin
<add switchValue="All" name="Information"><listeners>
<add name="Rolling Flat File Trace Listener"/></listeners></add><add switchValue="All" name="Error"><listeners>
<add name="Rolling Flat File Trace Listener"/></listeners></add><add switchValue="off" name="Trace"><listeners>
<add name="Rolling Flat File Trace Listener"/></listeners></add></categorySources><sp
<allEvents name="All Events" switchValue="All"/><notProcessed name="Unprocessed Category" switchValue="All"/><errors name="Logging Errors & Warnings" switchValue="All"/></specialSources></loggingConfi
I can not recity the problem. I am using VB2010 (Premium), AutoCAD2011. Windows 7 32 bit machine. Can you help me to solve this problem?
Thanks in advance.
Zakir
Re: VS 2010
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hello Zakir,
In what you have posted, I see those <!-- and -->
You too seem to have the lines that specify the supportedRuntime in acad.exe.config commented.
Can you try removing those comment markers ?
Hope this helps.
Balaji
Developer Technical Services
Autodesk Developer Network
