NAnt + VS2008 csproj annoying thing

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Ok, so you have an automated script for building your system… yes?

You decide to plug in in another your c# projects created by Visual Studio 2008 and run them via msbuild task and then it brakes… MSBuild tells you that it can’t find c# targets.

You go to your project file and see that it actually uses now a new property for setting up the tools path which obviously NAnt (or the community contrib task MSBuild) cannot resolve:

<Import Project=”$(MSBuildToolsPath)\Microsoft.CSharp.targets” />

The fix is actually quite easy, but still it annoyes me :)

Change the above to the old version:

<Import Project=”$(MSBuildBinPath)\Microsoft.CSharp.targets” />

And it works like a charm! only it annoyes me :)

Hope this helps someone!

Cheers!


Filed under: C#, VS2008
Written on: 20 Jan 2008 · No Comments »

Same Web Application Project in both VS2005 and VS2008?

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5 out of 5)
Loading ... Loading ...

Having problems with it?
If you load it up in VS2005 it brakes that it can’t find the target, if you open it in VS2008 and it was previously working in VS2005 it upgrades it so it doesn’t work there any more.


Frankly I am surprised that the guys at MS did such a bad job of Multitargetting. My biggest pain points so far include:

- .NET 2.0 SP1 - This one really sucks - if you said that it supports .NET 2.0 - it should support just that, not .NET 2.0 SP1 - to my situation it’s just a crippled version of 3.5 framework, and as we need to take down the whole server collocation to install the new framework, test it and everything… it’s the complete same thing when we are installing SP1 to install 3.5 as well… then we come to the conclusion… who the hell needs that SP1, or at least without any other choice (I wouldn’t made if they said… you have 2.0, 2.0 SP1, 3.0, 3.0 SP1 and 3.5) - or at least made the framework files aware of it (now the new files override the old ones and your developer workstation is never the same) - PITA

- Code Analysis rules - While trying to solve the problem of having a solution and projects which REALLY work on .NET 2.0 and in both VS2005 and VS2008 (you didn’t think that now that we have this PITA approach to multitargetting ALL developers on ALL projects will automatically switch to VS2008? Especially when now need to be able to build the project on a SEPERATE .NET 2.0 Vanilla machine… just so that we know in production it will work… and only work because there is no means of being 100% sure) I’ve tried the great solution of Krzysztof Cwalina via FxCop rule which validates that you haven’t used any of the features of .NET 2.0 SP1.

Now - if you imagined that you could just switch on the rule, switch off other rules and have it work both in VS2005 and VS2008… you were wrong… it’s not the problem with the rule… it works perfectly… but VS2005 has some rules which VS2008 doesn’t and vice-versa. So if you switch everything off in VS2005 except Multitargeting rules and go to VS2008… VS2008 has some of them (probably the ones VS2005 doesn’t have) and if you go to VS2008 and turn the all the rules there and come back to VS2005 then there some rules are turned on (again… probably the ones VS2008 doesn’t have)… aaargh… soon after that you give up :(

Again… PITA!

- Web Application Projects - Ok, this one is actually solvable… When you upgrade your WAP project to VS2008 you get near the end of the file this:

wap1

(click to view big picture)

Notice the 9.0 version… That’s the new version of WAP and naturally it doesn’t work with VS2005… VS2005 it has it’s own version - 8.0:

wap2

And… you’ve guess it… when you open WAP project converted in VS2008 in VS2005 it doesn’t work because of that line.

Solution is actually quite simple… Add both lines in your project file only apply them conditionally based on the VS version:

wap3

By doing this your project can now be opened and built in both VS2005 and VS2008.

Although again… one question again begs to be asked… Why didn’t the MS guys do the same thing from the start? again… PITA

 

Hope this actually helps someone :)

Cheers!


Filed under: VS2005, VS2008
Written on: 12 Dec 2007 · No Comments »

News about MVC framework and other bits from MS

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Finally some news. I’ve been really pissed of that as an MVP for ASP.NET I cannot get into the group which gets the early bits of the new MVC framework but it looks like it’s going to be released to the public anyway so ok (although I am still not ok that it was a very closed circuit).

So, the news is… seems like we are going to see it (and allot of other goodies) sometime next week as ScottGu mentions in his blog here:

 

http://weblogs.asp.net/scottgu/archive/2007/11/29/net-web-product-roadmap-asp-net-silverlight-iis7.aspx

 

So, interested in knowing what’s next? Interesting getting the early bits?

Then read the above blog post for more details on the future of the platform and the general roadmap.

 

Cheers!


Filed under: .NET, ASP.NET, ASP.NET MVC, Ajax, Interesting sites, VS2008
Written on: 30 Nov 2007 · 1 Comment »

Visual Studio 2008 Shell… another stab at good practices implemented by Eclipse people?

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

As you know, a week ago I’ve participated in a Eclipse Day here in Split and got to know some of the great architectural ideas behind the tool.

One of the things I liked most about Eclipse was it’s MicroKernel architecture… and possibility to basically have a naked shell of the IDE and customize it to your needs. That is something I would definitely like to have with Visual Studio I thought right away.

 

Then this weekend I stumbled upon some great materials about a little known goodness that the new Visual Studio brings to the table… Visual Studio 2008 Shell.

Basically Microsoft decided to put up a download of the new studio shell online so that people (VSIP) could make their own customized tools and IDE’s based on the studio.

I really appreciate the idea… and as much as I don’t think that new Shell implementations will spawn everyday now, definitely if you are serious IDE vendor, this is a great opportunity to strip out from the Studio what you don’t need and just implement your own functionalities and packages how you like it.

Some reading materials:

http://www.eweek.com/article2/0,1759,2141804,00.asp

http://www.crn.com/software/199900939

http://blogs.msdn.com/usisvde/archive/2007/06/04/visual-studio-2008-shell.aspx

http://www.code-magazine.com/Article.aspx?quickid=0710032

 

One more thing… it’s not all that cherries and blossom :) The shell is still made the “Microsoft way” (overly complicated and with no ease of use)… but it’s a great start, and hopefully partners or even Microsoft itself will improve the tooling around it to make it easier to use in the future.


Cheers!


Filed under: VS2008
Written on: 28 Nov 2007 · 1 Comment »

YAVSRP - Yet Another Post about Visual Studio 2008 being released!

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 3 out of 5)
Loading ... Loading ...

It’s out, the dirty secret… prolonged for so much time is out… Visual Studio 2008 RTM has been released!

(in case your wondering… sarcasm)

http://weblogs.asp.net/scottgu/archive/2007/11/19/visual-studio-2008-and-net-3-5-released.aspx

But anyway, do you plan to start using it?

One great thing about it is that it supports .NET 2.0 projects, now if they only hadn’t gone and s…w it out with .NET 2.0 SP1!

Look here:

http://blogs.msdn.com/msbuild/archive/2007/10/09/multitargeting-against-net-2-0.aspx

How do you plan to handle it?

My plan is on the current project to just place it on VS2008 (new Studio has some obvious benefits as described in ScottGu’s blog) and try with this great idea (via FxCop) to continue building against for vanilla .NET 2.0:

http://blogs.msdn.com/kcwalina/archive/2007/10/02/Multi_2D00_TargetingAndFxCop.aspx

Did you try it? Do you, and how do you plan to guide your department towards the new Studio?


Filed under: VS2008
Written on: 19 Nov 2007 · No Comments »

Looking for resources to help your developers to learn about new Visual Studio?

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...

Then look no further.

Guys from MS have started publishing videos on the subject and they look quite nice, if you are in need of such material (as no doubt almost every dev. department will be) look here:

http://msdn2.microsoft.com/en-us/vstudio/bb655906.aspx



Filed under: VS2008
Written on: 18 Sep 2007 · No Comments »