This of course is for both C# and VB, you can remove the non-used language section. The reason this is needed is that when you have a website, individual pages are compiled when requested, which requires the CodeDom to know which version of the framework you want to use. If you use a Web Application project this setting is not needed since an assembly is pre-compiled for all pages in your project.
Friday, March 12, 2010
Web Sites and the CodeDom
If you are using a WebSite (as opposed to Web Application project), and upgrade to .Net 3.5 (so you can use features like LINQ), you will need to add the following config section to your web.config:
This of course is for both C# and VB, you can remove the non-used language section. The reason this is needed is that when you have a website, individual pages are compiled when requested, which requires the CodeDom to know which version of the framework you want to use. If you use a Web Application project this setting is not needed since an assembly is pre-compiled for all pages in your project.
This of course is for both C# and VB, you can remove the non-used language section. The reason this is needed is that when you have a website, individual pages are compiled when requested, which requires the CodeDom to know which version of the framework you want to use. If you use a Web Application project this setting is not needed since an assembly is pre-compiled for all pages in your project.
Labels:
3.5,
CodeDom,
Linq,
Web Application Project,
WebApplication,
WebSite
Wednesday, February 10, 2010
Publish click once application via MSBuild
By default, the only way to create a click once installed application is to publish via Visual Studio. If you are planning to automate your builds using TFS Team Build projects, you will need the following task to actually publish your product:
In your TFSbuild.proj, use the following MSBuild task:
Properties="Configuration=%(ConfigurationToBuild.FlavorToBuild);
PublishUrl=http://appserver/MyProduct/;
PublishDir=$(OutDir)_PublishedWebsites\MyProduct.UI\;
InstallUrl=http://appserver/MyProduct/;
InstallFrom=Web;
DTPublishDir=$(OutDir)_PublishedWebsites\MyProduct.UI\;
ApplicationVersion=$(ClickOnceVersion);
ProductName=MyProduct_DEV; <--NOTE: this allows you to publish different versions of the same product.
PublisherName=MyCompany;"
Targets="Publish" />
Additionally, checking the "minimum version required" option under the Update panel will cause clients to be updated without the option to skip new versions (assuming the client already had a prior version installed). The clients will also be required to get a version that is higher than what is marked as minimum.
In your TFSbuild.proj, use the following MSBuild task:
Additionally, checking the "minimum version required" option under the Update panel will cause clients to be updated without the option to skip new versions (assuming the client already had a prior version installed). The clients will also be required to get a version that is higher than what is marked as minimum.
Subscribe to:
Comments (Atom)