How to make VS 2010 press F5 also "Configuration conversion" - XDT Transformation Tool

How have the "Configuration conversion" in VS 2010 press F5 - XDT Transformation Tool


This would have been a month ago, I am ready after just want to say we should send the finished TechDay

Made a three in front on the whole crooked to the other article (Khan)

In the initial project will be uploaded to existing MVC2 Azure and troubleshooting This one has mentioned configuration conversion mechanism

It allows us to deploy when you can switch to a different Config file

We all know that Azure project deployment time is not short, so this is very important test machine

Hopes to use native SQL Server in the machine test, and after deployment with SQL Azure. (Test data, the environment is better control)

Because of this configuration conversion feature is very important

And when the ship you will not want to test out the deployment of config

Might say, we go to the Config are another kind of XML file and then read how, how kind.

But no matter so be sure to modify the configuration file for the job

To manually change? That will increase the chance of human error modification.

Especially someone else to help you modify the time, that is, someone will Orz Correction time-tested ah ~ ~ ~

Since the original design intent can be automatically switched upon deployment

So in the development environment, it is still only use the default Web.Config

Some can now reach ConfigTransformation Tool can freely switch the IDE

This ASP.NET developers who are very helpful

Because this way you can in a variety of environments "on their own computer," "test area", "remote database" and so there are different Config

This configuration conversion function must use ASP.NET 4.0, of course, must be a Web project.

How to do it?

=============   0   ======================

Installation Kit NuGet

http://nuget.codeplex.com/

Diablo large "bare hands still sweat library? NuGet try it."

http://blog.darkthread.net/post-2011-03-12-nuget.aspx

=============   1   ======================

First, you'll need to configure how the group can do to switch (the default is Debug, Release)

image

image

New Configuration

image

After selecting the source of most believe configuration settings, and then modify their own would be relatively simple

image

Next will help you convert from the new configuration tool. And always remember if not modified configuration, it can not be clicked here

============= 2 ======================

Remember we must first select the "Web Project" and then click on "Tools" -> Library Package Manager -> Manage NuGet Packages

  image
I remember first selecting the "Project" and then open NuGet 

In the upper right corner of the input "XDT Transformation Tool" you will find the kit, press install on it!

image

After installation you will see in the Installed packages in the project will be ConfigTransformationTool

image
Also in the Web project will be more a reference ctt

 image

Will automatically help you in version control in all the packages have joined

This way is complete, then simply press "F5" As long as the switch configuration

CTT will automatically help you to configure combined! ROCK!

Since this package basically only be used in "development environment", so do not forget the "Copy to a local" to False

Otherwise, if the Server is not installed SQL Server The following error occurs

 image

One can not load files or components 'Microsoft.SqlServer.BatchParser' or wherein dependencies. Trying to load a malformed program.

Description: An unhandled exception occurred during the execution of the current Web requirements. Please review the stack trace for more on error, and the position generated in the program.
Exception details: System.BadImageFormatException: not load files or components one 'Microsoft.SqlServer.BatchParser' or wherein dependencies. Trying to load a malformed program.

=== 系结前状态资讯 ===
记录: 使用者 = DEMOfranma
记录: DisplayName = Microsoft.SqlServer.BatchParser
 (Partial)
警告: 提供了组件的部分系结资讯:
警告: 组件名称: Microsoft.SqlServer.BatchParser | 网域 ID: 2
警告: 如果只提供部分的组件显示名称,就会发生部分系结。 
警告: 这可能会使系结器载入不正确的组件。
警告: 建议为组件提供完全指定的文字识别,
警告: 该识别是由简单名称、版本、文化特性和公开金钥语汇基元组成。
警告: 如需详细资讯和这个问题的一般解决方法,请参阅白皮书 http://go.microsoft.com/fwlink/?LinkId=109270。
记录: Appbase = file:///C:/WorkSpace/Franma/TailspinToys/Dev/Src/Tailspin.Web/
记录: 初始 PrivatePath = C:WorkSpaceFranmaTailspinToysDevSrcTailspin.Webbin
正在调用组件 : (Unknown)。
===
记录: 此系结在 default 载入内容中开始。
记录: 正在使用应用程序组态档: C:WorkSpaceFranmaTailspinToysDevSrcTailspin.Webweb.config
记录: 使用主机组态档: 
记录: 从 C:WindowsMicrosoft.NETFrameworkv4.0.30319configmachine.config 使用电脑组态档。
记录: 目前不会套用原则至参考 (私用、自订、部分或以位置为主的组件系结)。
记录: 正在尝试从新的 URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/c9e82cff/44032f9b/Microsoft.SqlServer.BatchParser.DLL 下载。
记录: 正在尝试从新的 URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/c9e82cff/44032f9b/Microsoft.SqlServer.BatchParser/Microsoft.SqlServer.BatchParser.DLL 下载。
记录: 正在尝试从新的 URL file:///C:/WorkSpace/Franma/TailspinToys/Dev/Src/Tailspin.Web/bin/Microsoft.SqlServer.BatchParser.DLL 下载。
错误: 无法完成组件的安装 (hr = 0x8007000b)。已终止探查。

参考数据

XDT Transformation Tool

http://ctt.codeplex.com/

http://vishaljoshi.blogspot.com/2009/03/web-deployment-webconfig-transformation_23.html

ASP.NET 4.0, Part 4: Config Transformation Files

Web.config Web application project deployment of transformational grammar

http://msdn.microsoft.com/zh-tw/library/dd465326.aspx

Original: Large column  how VS 2010 press F5 also "Configuration conversion" - XDT Transformation Tool


Guess you like

Origin www.cnblogs.com/chinatrump/p/11514334.html