jmac
jmac

Reputation: 255

Build Issue in Visual Studio 2010

I cannot build my solution in Visual Studio 2010 without checking out my setup project. Is there something that I can do to rectify this?

Here's the error message:

The command you are attempting cannot be completed because the file 'FooSetup.vdproj' is under source control and is not checked out.

Upvotes: 4

Views: 7003

Answers (5)

Hakan Fıstık
Hakan Fıstık

Reputation: 19511

  1. Right click on the Setup Project in the Solution Explorer.
  2. Select Check out for Edit... from the context menu.
  3. Press Check Out button in the window which appeared.

The problem should be solved.

Upvotes: 2

Mohan Kumar
Mohan Kumar

Reputation: 6056

The issue is because, the file 'FooSetup.vdproj' is not checked out. This means its a Read-Only file.

If you don't want to checkout the file, work offline (without the project being connected to source control)

Its an issue with VS2010 SP1. You can check for any of the workaround mentioned in the Microsoft Connect.

Upvotes: 2

wizzardz
wizzardz

Reputation: 5874

Microsoft has fixed this issue, the hotfix is available here

MS Connect : http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=35848

Code Gallery: http://archive.msdn.microsoft.com/KB2529927

Upvotes: 0

jmac
jmac

Reputation: 255

While doing further research, I found an article explaining that upgrading to SP1 caused this issue and there is a hotfix available. My colleague isn't getting the problem and didn't upgrade to VS2010 SP1.

Here's the excerpt that describes my problem and what is occurring in the setup project:

I have just upgraded from VS 2010 to VS 2010 SP1 and I now run into an "infinite loop" of dialog boxes when building a setup (.vdproj) project that is under source control. If the .vdproj is not checked out and I build up the project I get a message when it starts building the setup project saying "The command you are attempting cannot be completed because the file 'XXX.vdproj' is under source control and is not checked out." There are ok and help buttons on the dialog, but if I press the ok button the dialog just closes and reappears. I have to then use task manager to kill devenv.exe.

If I check out the .vdproj before doing the build I can see that the file is changed. It will always change the PackageCode property of the installer, but will sometime also reorder various parts of the file.

My problem is that in all previous versions of VS, simply building up the installer didn't make a change to the file and I don't want to have to have my setup projects checked out all the time to be able to build them up. I also have a scripted build that runs devenv and this fails for the same reason as above.

http://connect.microsoft.com/VisualStudio/feedback/details/650587/vs-2010-sp1-changes-packagecode-in-vdproj-on-each-build-but-fails-as-source-controlled

Upvotes: 0

Rudi
Rudi

Reputation: 3228

Setup projects are notorious in being not compatible with source control. If anything in the FooSetup.vdproj needs to/is changed during the build, it will fail with that message.

After each check-in, I always check-out the Setup project immediately. AFAIK it is a PITA.

Upvotes: 0

Related Questions