Red Gate forums :: View topic - Is CreatePDB="0" inverted or simply not working?
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SmartAssembly 5
SmartAssembly 5 forum

Is CreatePDB="0" inverted or simply not working?

Search in SmartAssembly 5 forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
Uniwares_AS



Joined: 11 Oct 2007
Posts: 132

PostPosted: Thu Aug 05, 2010 11:59 pm    Post subject: Is CreatePDB="0" inverted or simply not working? Reply with quote

I do have set the CreatePDB to no, but I get an error from SA accessing the .PDB file. When I set it to create the pdb there is no error. This happens for all projects, not a specific one. Am using VS2010.

Code:
        <Options>
            <Debugging CreatePDB="0" />
        </Options>


Here is the build log

Code:
------ Build started: Project: MyApplication, Configuration: Release Any CPU ------
  SmartAssembly v5.1.0.3
  Copyright c Red Gate Software 2005-2010
  Loading project X:\Uniwares\Apps\Build\MyApplication.{sa}proj
    Output=X:\Uniwares\Apps\Applications\MyApplication\obj\Release\MyApplication.exe
  Analyzing...
  Preparing...
  Creating Assembly...
  ERROR: SmartAssembly cannot access X:\Uniwares\Apps\Applications\MyApplication\obj\Release\MyApplication.pdb'.
 
  The file is probably in use or locked by another process. Please try again and restart SmartAssembly if the problem persists.
X:\Uniwares\SmartAssembly.targets(10,3): error MSB6006: "SmartAssembly.com" exited with code 1.
Back to top
View user's profile Send private message MSN Messenger
nick.maidment



Joined: 29 Jan 2010
Posts: 74

PostPosted: Mon Aug 09, 2010 3:23 pm    Post subject: Re: Is CreatePDB="0" inverted or simply not working? Reply with quote

hmm, seems a little backwards!

Can you close sa and then use process explorer to see what is holding on to the pdbs? what happens if you move the pdbs in question then try to build without debugging infomation?
Back to top
View user's profile Send private message
JasonC



Joined: 16 Aug 2006
Posts: 84

PostPosted: Mon Aug 09, 2010 4:30 pm    Post subject: Reply with quote

You get this if the output path of the VS build is the same as the output path for SmartAssembly. i.e. You can get this error if "Output Path" in Visual Studio->Properties->Build is set to "\obj\Release\MyApplication.exe". It should be set to something like "\bin\Release\MyApplication.exe"

The PDB thing isn't about SmartAssembly's PDB option, it's about SA reading from the build output of VS (in obj\release) and writing it to the same file (in obj\release).

Tell me if this helps!
_________________
Jason Crease
Red Gate Software
Back to top
View user's profile Send private message
Uniwares_AS



Joined: 11 Oct 2007
Posts: 132

PostPosted: Mon Aug 09, 2010 5:52 pm    Post subject: Reply with quote

@nick: will try and see what's happening with that.

@Jason: since I am using it as a aftercompile step, i cant change the output to something else or other build steps after will fail. But anyway, it doesn't make any sense, why would it fail to read but succeed to write?
Back to top
View user's profile Send private message MSN Messenger
Uniwares_AS



Joined: 11 Oct 2007
Posts: 132

PostPosted: Tue Aug 10, 2010 11:01 pm    Post subject: Reply with quote

Just ran it under procmon and saved the log for both cases, with and without pdb creation.

For me it looks like SA shoots in its own foot since VS is closing the file before passing control to SA.

The difference is that with CreatePDB=0 SA tries to delete the pdb file which VS created while it is still open for reading. With CreatePDB=1, SA writes to a new .pdb file in the temp folder then calls {CLRTools}.exe to process both files and does NOT try to delete the file.

Can send you the logs.
Back to top
View user's profile Send private message MSN Messenger
Uniwares_AS



Joined: 11 Oct 2007
Posts: 132

PostPosted: Tue Aug 10, 2010 11:07 pm    Post subject: Reply with quote

Oh, one more thing. CreatePDB=0 works fine when I change the build settings from "full" or "pdb-only" to "none". While I might understand that if SA depends on the PDB creation settings of the compiler it could report an error, it definitely should not be the current one.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group