I'm following the tutorial at
TAG-Software but im getting problems. I notice the tutorial uses VS 2003, and wonder if its been tested with 2002? When I add my new PA Project, and then add a reference to the DNN project, I get the build error below...
------ Rebuild All started: Project: DotNetNuke, Configuration: Debug .NET ------ Preparing resources... Updating references... Performing main compilation... Building satellite assemblies... The file 'bin\DotNetNuke.dll' cannot be copied to the run directory.
The process cannot access the file because it is being used by another process. Could not copy temporary files to the output directory.
If I remove the reference from my PA, then they both compile fine independently. Seems to be that having the project reference from the PA places a file lock on the dotnetnuke.dll - I'm assuming there must different behaviour under VS 2003? So has anyone
else got this working in VS 2002? Thanks in advance.
Ok, ive found a fix (this is only tested, and may only apply to VS 2002). You might want to add this to your tutorials... also the screenshots which show the files & folders that are present in your web directory but not in your VS project and show up in VS
2003 as 'ghosts' - note this features is not present in VS 2002 afaik. Heres the fix: After adding the project reference to DNN from your PA project, select the reference's properties and set "Copy Local" to be False. Now it should all work fine. Heres the
MS KB link:
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q313/5/12.ASP&NoWebContent=1
I have used Joe's tutorial with no issues using vs2002. I too did not know about the "ghost folders" until a few weeeks ago. Go to Project---> Show all files and this will show any files and directories that are not part of a project bu reside in the same directory
structure. Make sure when you add the refrence from your PA to DNN you add a project refrence and not a refrence to the DLL Bert
It looks like the real problem is that the PA did not have its build output directory changed to the DNN\bin directory. If you followed the directions closely it should be ..\..\bin . Make sure that you make this correction for both the Debug and Release versions
as the settings can be different for each configuration.
Unfortunately this is not the case. I thought i had solved the problem by setting this "Copy Local" property on the PA's reference to DNN. But the problem creating the dotnetnuke.dll is persisting and is becomming very annoying! Someone else must have experienced
this problem surely? I'm in need of some ideas here. I have checked my ouput dirs for the PA's dll and it is the correct place (DNN\bin) ... everything works and debugs as expected, but sometimes VS just decides it cant build DNN as says the dotnetnuke.dll
is in use by another process ( I have used sysinternals Process Explorer to check which processes have handles to the dotnetnuke.dll - it reports only devenv.exe ). The only way I can get it to work again is by a random processes of shutting down VS, toggling
"Copy Local" on the DNN reference of my PA, and attempting to delete dotnetnuke.dll. Occasionally it reports bin\Dotnetnuke.dll, and sometimes its "C:\My Docs\...\VSWebCache\...\dotnetnuke.dll" that are in use. Either way it fails to build. Is the problem
that I am develpoing "live" as in my development dir is the actual virtual directory that the website is running on? bugger .... im stumped
1. Is your reference to the DNN project and not the DLL? 2. I had problem where VS could not overwrite the dotnetnuke.dll in the offline cache, I didn’t realize that it was the cache till I looked at the error closely. Once I deleted the offline cache and restarted
VS the issue went away bert
1. Yes my reference is to the project and not the "DLL". All that setting the reference to the project does is link with that project's output files anyway (in this case the DLL!). 2. I also have had that problem and fixed like you did, but it keeps comming
back!
I should point out that as soon as I remove the reference from my PA to DNN, then DNN builds just fine. Obviously though my PA stops building then :( So its obviously something todo with having a reference to the dotnetnuke.dll
Jack, I have had the exact same problem as you are. I have determined that I either need to delete the cache everytime I open the solution, or move the PA assemblies into their own directory. I decided on the second choice and now compile my private assemblies
and manually move them after every compile. I am having trouble debugging on my machine (permissions I think), so I haven't been able to ensure debugging works with this method. Hopefully someone has run into this and it is not just us. I am not sure if this
is just a VS.net 2002 issue or if VS.net 2003 has the same issue.
Ok, well I just this minute upgraded to VS 2003 and it does *not* fix the problem! Searching through google groups there are hundreds of people suffering the same problem. There are several MS KB articles about this but none has helped me.
KB 311491
KB 319991 I have worked out a solution that does work though: 1) Set output directory for your PA be something local to the project i.e. "bin\" rather than "..\..\bin\". 2) Use the post-build step (only available in VS 2003 :( ) to copy the PA's .dll and
.pdb into your DNN bin directory. For example: copy $(TargetFileName) $(SolutionDir)bin copy $(TargetName).pdb $(SolutionDir)bin 3) enjoy debugging of PAs without need to painfully copy or delete any dlls! From what I have researched, assemblies must
appear either in the GAC or in the "bin" folder directly inside your webapp, yet Visual Studio essentially has a big problem when several webprojects attempt to use the same "bin" output folder.
jacku
Member
95 Points
19 Posts
TAG PA Debugging Tutorial with VS 2002
Jul 25, 2003 02:35 PM|LINK
Software Engineer & C# Evangelist,
Kuju Entertainment,
United Kingdom
jacku
Member
95 Points
19 Posts
Re: TAG PA Debugging Tutorial with VS 2002
Jul 25, 2003 04:12 PM|LINK
Software Engineer & C# Evangelist,
Kuju Entertainment,
United Kingdom
bertcord
Contributor
4075 Points
813 Posts
Re: TAG PA Debugging Tutorial with VS 2002
Jul 25, 2003 04:58 PM|LINK
jbrinkman
Star
9822 Points
1963 Posts
Re: TAG PA Debugging Tutorial with VS 2002
Jul 26, 2003 10:02 AM|LINK
jacku
Member
95 Points
19 Posts
Re: TAG PA Debugging Tutorial with VS 2002
Jul 28, 2003 11:18 PM|LINK
Software Engineer & C# Evangelist,
Kuju Entertainment,
United Kingdom
bertcord
Contributor
4075 Points
813 Posts
Re: TAG PA Debugging Tutorial with VS 2002
Jul 29, 2003 02:13 AM|LINK
jacku
Member
95 Points
19 Posts
Re: TAG PA Debugging Tutorial with VS 2002
Jul 29, 2003 09:24 AM|LINK
Software Engineer & C# Evangelist,
Kuju Entertainment,
United Kingdom
jacku
Member
95 Points
19 Posts
Re: TAG PA Debugging Tutorial with VS 2002
Jul 29, 2003 09:34 AM|LINK
Software Engineer & C# Evangelist,
Kuju Entertainment,
United Kingdom
joldham
Participant
1295 Points
259 Posts
Re: TAG PA Debugging Tutorial with VS 2002
Jul 29, 2003 12:09 PM|LINK
jacku
Member
95 Points
19 Posts
Re: TAG PA Debugging Tutorial with VS 2002
Jul 29, 2003 03:01 PM|LINK
Software Engineer & C# Evangelist,
Kuju Entertainment,
United Kingdom