Code Red > .NET

How to deploy .NET customizations?

(1/2) > >>

sinc:
OK, I've written a new C# program that adds a custom command to Civil-3D, and it works when the DLL is netloaded from the local machine, but not when it's on the network.

I'd like to put the DLLs on a network drive, so that when I make changes, I can just copy the new DLL to the network, and everyone on the network immediately has the new version.  So how do I do this?  Or should I do something else?

Kerry:
There are security issues to overcome. so your setting need to be changed. I don't recall the exact details but a search of the autodesk.autocad.discussion.dotnet group should give you some tips.

added:
For instance Search 'Nornam Yuan'  'deployment'

Keith™:
The only issue I can see with doing that is the DLL may be locked by the computer that opens it, thus limiting the ability of you to overwrite it.

A simple fix would be a script added to the startup of each workstation to copy the file locally if a new version is available.

I have actually written some of my programs to check for updates and download the new file if there is an update, but it can be a trick to do ...

If you want to do that, simply have the program when it starts, check a network location (make sure error checking is in place so it doesn't crash if the network is not available) for a file that holds the current version, then if the version in the file is different, copy the file locally as a different file name (temp folder), start the second copy of the program from the temp folder, end the first copy, the second copy checks to see if it is running from the temp folder, if it is, copy itself to the location where the first program was located overwriting the first program.

Yes .. convoluted .. but it works .. and there is lots of coding to make it work properly ... in the end it will be worth it though ..

sinc:
OK, having each workstation copy the DLLs from the network may be the way to go.  What's the best way to add a startup script?  I've never done that on Windows machines.

sinc:
Actually, I managed to get permissions changed, thanks to a post on Autodesk's website.

I had been unable to do it because, for some reason, I only see the .NET 1.1 Admin and Config on my machine, and not the .NET 2.0.  No idea why.  But there's also a command line utility, CASPOL, found in c:\windows\microsoft.net\framework\version\

So I just had to run the following line on each of our machines, using the 2.0 version of CASPOL:

caspol.exe -machine -quiet -addgroup 1 -url "file://MyServer/My DLL Deployment Directory/*" FullTrust

Navigation

[0] Message Index

[#] Next page

Go to full version