.NET

.NET

Reply
Valued Contributor
93 Posts
1 Kudo
Registered: ‎03-23-2009
Post 11 of 26

Re: NET-RELOAD Utility for Visual Studio - Download Here

10-12-2011 09:56 AM in reply to: Artvegas

My initial problem is caused by the assembly being loaded off our local network. I am able to netload it when it resides on my local drive. Now the problem is , "No running Viusla Studio instances were found." I am hoping this can be fixed with a tweak to the code somewhere. Do you think this is possible?

 

Thanks, aks

Moderator
1,464 Posts
277 Kudos
Registered: ‎04-09-2008
Post 12 of 26

Re: NET-RELOAD Utility for Visual Studio - Download Here

10-12-2011 10:10 AM in reply to: Artvegas

As an alternative - simply rename the dll-file and create a new one with the same name


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

Valued Mentor
388 Posts
30 Kudos
Registered: ‎03-31-2005
Post 13 of 26

Re: NET-RELOAD Utility for Visual Studio - Download Here

10-12-2011 10:17 AM in reply to: aksaks

I think you need to search here for CASPOL.  You can run dlls locally or setup CASPOL to allow access to user defined network dlls.

Distinguished Contributor
104 Posts
11 Kudos
Registered: ‎04-21-2011
Post 14 of 26

Re: NET-RELOAD Utility for Visual Studio - Download Here

10-12-2011 10:18 AM in reply to: aksaks

Hi aks,

 

Did you get my response to your last post?

 

I don't believe this will work for VS express editions. However I might have another way of doing this with express.

 

I sent you a private message. To access your messages just click on the mail symbol at the top of the webpage (as shown in the pic below):

 

aaa.jpg

 

Hope to hear back from you soon.

 

Art

Distinguished Contributor
104 Posts
11 Kudos
Registered: ‎04-21-2011
Post 15 of 26

Re: NET-RELOAD Utility for Visual Studio - Download Here

10-12-2011 10:42 AM in reply to: Artvegas

Hi Alexander,

 

I did try that - unfortunately renaming dll files doesn't work. The commands don't get overriden.

 

It appears that the dll files need to have different Intermediate Language (IL) signatures. Then the commands are overriden in AutoCAD with subsequent NETLOADs.

 

If you change a project's AssemblyName property before you compile the dll files, then it works. I'm not exactly sure of the reason. I'm guessing when I say it might have something to do with the way AutoCAD loads .NET assemblies into its AppDomain.

 

Art

Valued Contributor
93 Posts
1 Kudo
Registered: ‎03-23-2009
Post 16 of 26

Re: NET-RELOAD Utility for Visual Studio - Download Here

10-12-2011 01:23 PM in reply to: fieldguy

Thanks for reminding me about CASPOL. I did not have rights to do that the last time I looked into this. I'll give it another shot. Thanks 

Valued Contributor
85 Posts
0 Kudos
Registered: ‎12-15-2012
Post 17 of 26

Re: NET-RELOAD Utility for Visual Studio - Download Here

12-15-2012 04:57 PM in reply to: Artvegas

I am a fairly seasoned .NET developer and have been battling to set up a reasonable environment in which to work with Autocad 2013 / Visual Studio 2012. It has been quite a pain between not being able to debug, nor being able to "netreload" an assembly. This little utility is clever as hell, useful as all getout, and the first bit of light in my otherwise dismal experience with this. Nice work-around. Thank you Artvegas! 

 

FYI I had to set up a project and recompile it to get NetReload.dll to work in Autocad 2013. Also, the EnvDTE assembly can be referenced from Assemblies --> Extensions. Had to search for that a bit.

 

Kevin

Inventor 2013
Contributor
12 Posts
4 Kudos
Registered: ‎03-24-2009
Post 18 of 26

Re: NET-RELOAD Utility for Visual Studio - Download Here

01-12-2013 04:39 PM in reply to: Artvegas

First... Thank you very much!!!!

 

For those using the new Microsoft Visual Studio 2012 Express for Windows Desktop edition, here's the compatible version I compiled.

 

NetReload2013 command to run!

Serafin A. Albiero Jr.
Mentor
231 Posts
30 Kudos
Registered: ‎11-09-2012
Post 19 of 26

Re: NET-RELOAD Utility for Visual Studio - Download Here

01-18-2013 01:46 AM in reply to: Artvegas

Hi ,

 

I have tried to load your dll file direct with netload command. It shows me below error:

 

Command: netload
Cannot load assembly. Error details: System.IO.FileLoadException: Could not
load file or assembly 'file:///C:\Users\alamzaki\Desktop\VB_PPT\NetReload.dll'
or one of its dependencies. Operation is not supported. (Exception from
HRESULT: 0x80131515)
File name: 'file:///C:\Users\alamzaki\Desktop\VB_PPT\NetReload.dll' --->
System.NotSupportedException: An attempt was made to load an assembly from a
network location which would have caused the assembly to be sandboxed in
previous versions of the .NET Framework. This release of the .NET Framework
does not enable CAS policy by default, so this load may be dangerous. If this
load is not intended to sandbox the assembly, please enable the
loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569
for more information.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String
codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint,
StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean
forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String
codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint,
StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean
forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName
assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile,
Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm
hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks,
StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName)
   at loadmgd()

 

Can you have a look at this? It seems to me that this utility would be great if I can use it. I use only VB so I did not build your C# code into dll. Do you have VB command for this utility?

Mentor
231 Posts
30 Kudos
Registered: ‎11-09-2012
Post 20 of 26

Re: NET-RELOAD Utility for Visual Studio - Download Here

01-18-2013 01:47 AM in reply to: mzakiralam

Sorry , I forgot to add my ACAD version. I am using ACAD2011 to load your dll

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post