Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > Общие вопросы по .NET и C# > Framework 1.1 in VS 2005


Автор: Red Wind 30.4.2007, 17:57
Скажите, как можно заставить VS 2005 компилить проги для framework 1.1?

Автор: Stepan_Lameroff 30.4.2007, 19:13
Вопрос задается с завидной постоянность  smile 

Качаем http://www.codeplex.com/MSBee/Release/ProjectReleases.aspx?ReleaseId=18

Установив его, можно добавить в файл проекта инструкцию: 

<Import Project="$(MSBuildExtensionsPath)\MSBee\MSBuildExtras.FX1_1.CSharp.targets" /> 

Можно также  добавить условие, вроде:

Condition=" '$(BuildingInsideVisualStudio)' == '' AND '$(TargetFX11)'=='true'"

И компилировать 1.1 или 2.0 в зависимости от условий. 

Автор: Red Wind 30.4.2007, 20:48
Заинсталил эту тузлу. Добавил в файл ProjectName.csproj указанную строку, но проект компилиться если я юзаю в нём классы второго фрэймворка.

Автор: Stepan_Lameroff 1.5.2007, 10:12
Если асилить MSBee ReadMe.doc, то в п. 4.4 "Building VS projects that target .NET 1.1"
можно увидеть

Цитата

Once the user imports an MSBee .targets file, the project can be built using .NET 1.1. This is done by invoking msbuild.exe on the command line with the TargetFX1_1 property set to true and the project file (or its solution file) passed in. An example of a command build targeting .NET 1.1 is shown below:

msbuild [project file] /t:Rebuild /p:TargetFX1_1=true 

Автор: Exception 1.5.2007, 11:42
/offtop
MSBuild вообще классная штука
offtop/

Автор: Red Wind 1.5.2007, 12:09
Спасибоsmile

Автор: Дрон 2.5.2007, 20:52
Закреплю я пока эту тему, вдруг у кого-нибудь ещё интерес к данному вопросу будет.

Автор: Exception 3.5.2007, 16:57
Тогда лучше в FAQ добавить. Ща будет.

Автор: Дрон 3.5.2007, 17:38
Описание MSBee добавлено в FAQ: http://forum.vingrad.ru/faq/topic-149416.html
Из закреплённых я эту тему убираю.


Автор: Stepan_Lameroff 4.5.2007, 10:52
Может и не в тему, но очень удобное расширение  smile 
http://www.codeplex.com/msbuildshellex
user posted image
Цитата

MSBuild shell extension gives you what you've always wanted: A way of cleaning, building and rebuilding your .net projects from the explorer without needing to open Visual Studio 2005 or the Visual Studio 2005 Command Prompt.


Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)