Search This Blog

Monday, July 18, 2011

PRISM 'VS100COMNTOOLS' not set Cannot set the build environment; Visual Studio Web Developer 2010 Express

This means that PRISM cannot find your Visual Studio installation folder. Add this line in RegisterPrismBinaries.bat:

SET VS100COMNTOOLS=c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\

(or whatever folder you have vsvars32.bat in).

The beginning of the file should look like this:

--------------------------------------------------------------

@ECHO OFF

SET ScriptsDir=%~dp0\Scripts
SET BinDir=.\Bin
SET Pause=true
SET Register=true
SET VS100COMNTOOLS=c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\

IF "%1"=="/?" GOTO HELP

IF DEFINED DevEnvDir GOTO OPTIONS

IF NOT DEFINED VS100COMNTOOLS GOTO VSNOTFOUND
---------------------------------------------------------------

After running RegisterPrismBinaries.bat you should see:

---------------------------------------------------------------


------------------------------------------
Setting the build environment
------------------------------------------


------------------------------------------
Registration initiated
------------------------------------------

Microsoft (R) Build Engine Version 4.0.30319.1
[Microsoft .NET Framework, Version 4.0.30319.235]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

Build started 2011-07-18 16:34:36.
Project "C:\PRISM4\Scripts\RegisterPrismLibrary.proj" on node 1 (default target
s).
RegisterLibrary:
  regedit.exe /s "C:\Users\kosiara\AppData\Local\Temp\tmp35B9.tmp"
  Deleting file "C:\Users\kosiara\AppData\Local\Temp\tmp35B9.tmp".
Done Building Project "C:\PRISM4\Scripts\RegisterPrismLibrary.proj" (default ta
rgets).


Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.31

------------------------------------------
Registration completed
------------------------------------------

9 comments:

  1. Hi Bartosz,

    Did this trick work for you? Seems, I can't get it to work. I have both the Web Developer as well as the C# editions of Visual Studio 2010 installed, but the vsvars.bat is nowhere to be found on my system...

    Besides, whitespaces in directory names in batch files (even when put in quotes) as it throws an error.

    Best regards!
    Roland

    ReplyDelete
  2. If you have a 64-bit system, try looking in Program files(x86). I had Visual Studio 2010 C# and Web Developer installed as well as .NET 4.0. I know I ran a few updates from the web (Windows update) but that's all.

    ReplyDelete
  3. Install VS 2010 C++ Express. This will copy several tools including vsvars32.bat into C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\
    After this I was able to run RegisterPrismBinaries.bat successfully without any modifications.

    sharptooth

    ReplyDelete
    Replies
    1. Thank you sharptooth, that workded wonders...

      Regards,
      Sean

      Delete
  4. Thank you Bartosz. This blog solved my issue.

    ReplyDelete
  5. Hi Bartoz,

    Thanks I did this under Windows 8 and VS2012 so I changed the code in:
    SET VS100COMNTOOLS=c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\

    The Common7 folders is also in Visual Studio 2012 so after running the changed RegisterPrismBinaries Batch file it worked

    Greatings Eric

    ReplyDelete

If you like this post, please leave a comment :)