.NET Framework 4.0 DLL

.NET Framework 4.0 DLL

Anonymous
Not applicable
2,404 Views
4 Replies
Message 1 of 5

.NET Framework 4.0 DLL

Anonymous
Not applicable

This is getting ridiculous......

AutoCAD 2011....Visual Studio 2010 Pro
I created a Framework 4.0 DLL.....and it loads and runs fine on my machine.

 

Here is my "acad.exe.config"

<configuration>

  <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>
</configuration>

 

I went to another users machine...and had him Download .Net Framework 4.0 from:

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9cfb2d51-5ff4-4491-b0e5-b386f32c0992&dis...

 

I changed his "acad.exe.config"...to be just like mine...shown above.

 

When he tries to NETLOAD the DLL he gets:

 

Cannot load assembly. Error details:
System.BadImageFormException: Could not load file or assembly "....filename....." or one of it's dependencies.
This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
Blah..Blah..Blah...

WHAT ON GOD"S EARTH DO I HAVE TO DO TO MAKE THIS WORK?



 

0 Likes
2,405 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

Problem here was...I was "attempting" to run the DLL from a network location...and have since found out that .....that might not work unless you jump thru hoops...oh well...guess we'll have to copy everything down to local hard drives......great!

0 Likes
Message 3 of 5

Anonymous
Not applicable

Or you could add the load from remote sources switch

 

{code}

<runtime>       
 <generatePublisherEvidence enabled="false"/>
     <loadFromRemoteSources enabled="true"/>
   </runtime>

 

 

{/code}

Message 4 of 5

Anonymous
Not applicable

Do you add this....loadFromRemoteSources......to the Local "acad.exe.config" file?

0 Likes
Message 5 of 5

Anonymous
Not applicable

That's what I did.

http://msdn.microsoft.com/en-us/library/dd409252.aspx

 

Then I set the security settings for the computers and the network location using CASPOL.exe the same as I did in earlier versions.

0 Likes