Mittwoch, 6. Oktober 2010 23:43
Is there anyway I can see the exact call visual studio is making to cspack when I do a "publish"?
When I deploy through a visual studio "publish" everything works fine; but when I deploy the same project through a tfs build, I get the role recycles (initializing, stop, etc...).
I created my own cspack call, but I'd like to see what visual studio is doing - the "copy local=true' properties probably have an impact on the cspack call.
Here's what I have now -
"c:\Program Files\Windows Azure SDK\v1.2\bin\cspack.exe" "C:\Builds\MYPROJECT.Development\MYPROJECT.Development_20100924.3\Release\MYPROJECT.Deploy.csx\ServiceDefinition.csdef" /role:MYPROJECT.MYWEBROLE1;"C:\Builds\MYPROJECT.Development\MYPROJECT.Development_20100924.3\Release\MYPROJECT.Deploy.csx\roles\MYPROJECT.MYWEBROLE1\approot";MYPROJECT.MYWEBROLE1.dll /role:MYPROJECT.MYWORKERROLE1;"C:\Builds\MYPROJECT.Development\MYPROJECT.Development_20100924.3\Release\MYPROJECT.Deploy.csx\roles\MYPROJECT.MYWORKERROLE1\approot";MYPROJECT.MYWORKERROLE1.dll /out:"C:\Builds\StealthLab.Packages\MYPROJECT.Development\MYPROJECT.Deploy.cspkg"
Donnerstag, 7. Oktober 2010 00:47Is it a .NET 4 app? If so, be sure to set TargetFrameworkVersion=v4.0 in a specified file via the /rolePropertiesFile cspack parameter.
Donnerstag, 7. Oktober 2010 00:47P.S. This week's Cloud Cover episode (http://channel9.msdn.com/shows/Cloud+Cover) will demonstrate this.
Donnerstag, 7. Oktober 2010 17:52
Hey Steve - thanks I'll try it out and I'll update this thread with details. I'll definitely watch this week's Cloud Cover - anyone working with Windows Azure should!
From the original question - is there a way to see the exact cspack call Visual Studio is making? This way in the future, I may be able to see such parameters directly.
Now I'm on to some tasty desert pizza. ;-)
Donnerstag, 7. Oktober 2010 19:23
Steve, that did it, thank you! For others here are the details:
1) Create a text file, I called it "cspackproperties.txt" and placed it in the same directory where my Azure project is located (where my .csdef and .cscfg files are also located).
2) In this cspackproperties.txt file, add one line:
3) When calling cspack, for each role pass in the parameter /rolePropertiesFile - so my call to cspack became:
"c:\Program Files\Windows Azure SDK\v1.2\bin\cspack.exe" "C:\Builds\MYPROJECT.Development\MYPROJECT.Development_20101007.1\Release\MYPROJECT.Deploy.csx\ServiceDefinition.csdef" /role:MYPROJECT.MYWEBROLE1;"C:\Builds\MYPROJECT.Development\MYPROJECT.Development_20101007.1\Release\MYPROJECT.Deploy.csx\roles\MYPROJECT.MYWEBROLE1\approot";MYPROJECT.MYWEBROLE1.dll /rolePropertiesFile:MYPROJECT.MYWEBROLE1;"C:\Builds\MYPROJECT.Development\MYPROJECT.Development_20101007.1\Release\MYPROJECT.Deploy.csx\cspackproperties.txt" /role:MYPROJECT.MYWORKERROLE1;"C:\Builds\MYPROJECT.Development\MYPROJECT.Development_20101007.1\Release\MYPROJECT.Deploy.csx\roles\MYPROJECT.MYWORKERROLE1\approot";MYPROJECT.MYWORKERROLE1.dll /rolePropertiesFile:MYPROJECT.MYWORKERROLE1;"C:\Builds\MYPROJECT.Development\MYPROJECT.Development_20101007.1\Release\MYPROJECT.Deploy.csx\cspackproperties.txt" /out:"C:\Builds\StealthLab.Packages\MYPROJECT.Development\MYPROJECT.Deploy.cspkg"
Steve: is this simply creating the RoleModel.xml file correctly?
Before you gave me the above tip, I set the environment variable _CSPACK_FORCE_NOENCRYPT to true so Visual Studio would not encrypt the package and I also passed in the /noencrypt parameter to cspack. Using winmerge (http://winmerge.org/) – I had just found out:
1) There were no issues of dependent 3rd party dlls – they were present in both packages.
2) The main difference seemed to be the “RoleModel.xml” file, which was empty on the tfs build version.
- Als Antwort markiert Emmanuel Huna Donnerstag, 7. Oktober 2010 19:23
Donnerstag, 7. Oktober 2010 22:44I actually don't know where that target framework version setting ends up... what you did is a great way to see the impact. At this point you know more than I do. :-)