Monday, June 02, 2008

Problem using MSBuild 3.5 with PublishUrl and OneClick

I posted the following at MSDN forum:

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


We experienced a serious problem publishing our WinForm (Visual Studio 2008 project but targetted to .net Framework 2.0) with MSBuild 3.5 that we had to rollback to MSBuild 2.0. Knowing that we eventually need to move to .Net Framework 3.5, I think I better resolve the problem now before it's too late.

Before we moved to Visual Studio 2008, we used the following command line with MSBuild 2.0.50727 to build and publish our WinForm application:



msbuild c:\awesome_app\awesome.csproj /p:ApplicationVersion=1.2.3.4;Configuration=release;PublishUrl='http://awesome/myApp.AwesomeApp.Admin'


It did the following for us:
  • Create a folder called "...\bin\Release\myApp.AwesomeApp.AdminTemp" (as specified within the project setting)
  • Have the application compile and stored in "myApp.AwesomeApp.AdminTemp"
  • After we copied the files manually from "myApp.AwesomeApp.AdminTemp" the physical folder for the URL 'http://awesome/myApp.AwesomeApp.Admin', user can access the WinForm app by clicking a link that points to "myApp.AwesomeApp.Admin.Application"

Then we moved to Visual Studio 2008, and found that the command line doesn't work and thorw us error saying that "C:\Microsoft.CSharp.targets" is missing. Although we found a workaround by modifying the .csproj file, we decide to try doing the right thing by using MSBuild 3.5 . However, it seems like the behavior of MSBuild has been changed:

  • Instead of creating a folder based on the name specified in the project, it creates a folder "...\bin\Release\App.Deploy" regardless.
  • After we copied the files manually from "App.Deploy" the physical folder for the URL 'http://awesome/myApp.AwesomeApp.Admin', we can't access the WinForm app. Clicking the link that points to "myApp.AwesomeApp.Admin.Application" caused the downloading but eventually it says that something is wrong with the package, yet didn't explicitly say what.

So it seem like some behavior has been changed since 2.0.50727 regarding to OneClick and Publishing to an URL. Does anyone have the similar kind of experience, and able to find a way to work around the issue?



Daniel

0 Comments:

Post a Comment

<< Home