--> C# 1.1 Project Templates for VS 2005 - Impersonation Failure

C# 1.1 Project Templates for VS 2005

If the LINQ Preview can use the C# 3.0 compiler with VS 2005 there's nothing wrong with using the C# 1.1 compiler with VS 2005. (If you really have to :P)  The VS 2005 project templates is really simple to extend and I've compiled a small installer to add two new project templates to your available C# templates that makes use of the C# 1.1 compiler. One for Class Libraries and a Console Application template.

The MSI can be downloaded here.

To add more templates follow the standard procedure for creating a custom template and add the following line to the resulting .CSP file to import the C# 1.1 settings (Everett targets is a file compiled from Jomo Fisher's ready-made 1.1 msbuild file and should be installed if you run the installer):

  <Import Project="$(ProgramFiles)\Everett\Everett.targets" />

With this template you can use the IDE features but still compile for the older framework. There's plenty information on MSDN on creating your own project templates. Especially useful if you setup the same projects often. ie. Unit Tests with a different testing platform etc.

<disclaimer>It worked on my machine with Beta 2 installed but I haven't tested it anywhere else...I assume the RTM templates works exactly the same way.</disclaimer>

Filed under:

Comments

# Ernst Kuschke said:

Dude, this is the coolets thing I've seen in quite some time. Does it work nicely?

Tuesday, November 01, 2005 2:49 PM
# ComputerZen.com - Scott Hanselman said:
Saturday, November 05, 2005 10:07 AM
# ComputerZen.com - Scott Hanselman said:
Saturday, November 05, 2005 11:50 AM
# Kit Ong's News Pick Of The Day said:
Monday, November 07, 2005 11:48 AM
# Kit Ong's News Pick Of The Day said:
Monday, November 07, 2005 11:49 AM
# Kit Ong's News Pick Of The Day said:
Monday, November 07, 2005 12:27 PM
# Amar Galla's Weblog said:

Today is the launch of VS 2005, and almost everyone will soon have access to it. For those who would...

Monday, November 07, 2005 5:33 PM
# Jeffrey Vanneste said:

I was under the impression it was not possible to compile .NET 1.1 apps in VS2005 but apparently I am wrong. I haven't tried this out yet but pending it actually works this will be a great start to switching...

Tuesday, November 08, 2005 3:32 AM
# Jon Galloway said:

Great!

One question - why do you install into "c:\program files\everett" instead of the standard "$(MSBuildExtensionsPath)" which points to "C:\Program Files\MSBuild"?

If you release any updates, would you consider changing the path?

Tuesday, November 08, 2005 10:05 AM
# Armand du Plessis said:

Jon, I actually wasn't aware of the MSBuildExtensionsPath when I originally compiled the MSI.
It started as a quick hack to get 1.1 compilation going in 2005 and I wrapped that in the MSI but will definitely clean it up and change the path :-)

Thanks for pointing that out.



Tuesday, November 08, 2005 10:45 AM
# Marco Russo said:

Scott Wiltamuth ha comunicato che il Service Pack 1 di Visual Studio 2005 &#232; previsto per la prima met&#224;...

Wednesday, November 09, 2005 1:52 AM
# ComputerZen.com - Scott Hanselman said:
Thursday, November 10, 2005 4:40 AM
# Sherif Elian said:

it is working very well on the console application but it is not working on windows applications , it ignores what i did and complie also with framework 2,
can you help me in that ?
sherif.elian@gmail.com

Saturday, November 26, 2005 4:48 AM
# Kieron said:

Compiled a WinForms app just fine. As a test printed out the mscorlib.dll version no. ... was 1.0.5000.0 (:

Nice work, thanks!!

Friday, December 02, 2005 2:26 PM
# Udi said:

Hi,
I've changed my app.csproj (win app - compiled in 2005) to point to 'Everett.targets' but still it didn't work.

What am I missing?
Udi

Tuesday, January 31, 2006 1:41 PM
# Udi said:

Hi,
I've changed my app.csproj (win app - compiled in 2005) to point to 'Everett.targets' but still it didn't work.

What am I missing?
Udi

Tuesday, January 31, 2006 1:41 PM
# Alexander Gross said:

The compiled resource files (*.resource.dll) contain a reference to .NET 2.0's mscorlib. If anyone is trying to develop SharePoint 2003 Web Parts(*not* WSS), then these resources can't be used by SPS. STSADM will complain about the V2 reference. However, MSBee compiled assemblies work nicely as MSBee uses the V1 ResGen.

Wednesday, February 15, 2006 7:46 PM
# Shvanger said:

Hallo!
Also, ich bin echt froh, dass ich diese Seite gefunden habe. Da ich schon seit 6 Jahren stolze MS-BEsitzerin bin, wei&#223; ich zwar schon eine ganze Menge (mehr &#252;ber Erfahrungen als &#252;ber B&#252;cher gelernt...)

Saturday, March 11, 2006 10:30 PM
# Impersonation Failure said:


At the office we're doing a lot of development in Visual
Studio 2005 which targets version 1.1 of...

Wednesday, July 05, 2006 6:13 PM
# other » Blog Archive » Visual 2008 / C# 1.1 Compiler said:

Pingback from  other  &raquo; Blog Archive   &raquo; Visual 2008 / C# 1.1 Compiler

Saturday, January 12, 2008 6:48 PM
# asda@wp.pl » Blog Archive » Visual 2008 / C# 1.1 Compiler said:

Pingback from  asda@wp.pl  &raquo; Blog Archive   &raquo; Visual 2008 / C# 1.1 Compiler

Saturday, January 12, 2008 8:52 PM