Visual Studio 20(fuck you)15



  • I am trying to get something building for the client and I have a .NET 4.0 project and Visual Studio 2015. Microsoft claim that I can target multiple versions of the .NET framework without issue.

    BOLLOX IT DOES!

    NuGET was getting the latest versions of the .NET 4.0 framework libs as expected. Everything was referenced properly. I had some spurious errors about dll mismatch stuff. Usually you can solve this in the web.config at run time and tell it to use a (later) and compatible assembly.

    OMFG What a cluster fuck. Basically VS 2015 doesn't have any proper build definitions for anything 4.0. So because I have some assemblies looking for .NET 2.0 versions of assemblies ... build fails. Now some of this is NuGet's fault. So I say "fuck it" and upgrade everything to the latest framework out of pure desperation (it is a C# web api so there are not client side stuff, if it builds it is likely okay). The API lives on Azure so I can just make a new Virtual Magical Thingy and just run it on the new definition of that "instance".

    However it doesn't fucking tell you this. It says "increase the verbosity of the build log". So I look over the projects properties and I can't find it. There is something vague about MSBUILD.exe config files so I check their properties and nothing relevant pops up.

    Okay so I google the exact message and the first stack overflow post tells me Visual Studio is lying to me:

    Brilliant. The output from the compiler isn't accurate and for some reason it it part of the IDE settings. I have no idea if it has always been this way for more vanilla projects but I have always worked on monstrous projects and warnings etc are turned to max in the project ... so I expect it is a WTF I should expect but didn't know about for 10 years because I am more of a web dev than a C# dev (though I know the language quite well).

    I am in the process of install VS2010 and all the patches there-after just to see if the fucker compiles okay in 2010. If so the project is staying a VS2010 project for the foreseeable future.



  • @lucas1 said:

    NuGET was getting the latest versions of the .NET 4.0 framework libs as expected.

    Err... shouldn't those have already been installed during the VS install process or am I missing something?

    (I can't tell if VS2015 installs those because VS2010 and 2013 also live on the same machine as my only VS2015 install.)



  • @powerlord

    The build definition doesn't live in "Program Files (whatever)\VS"

    So everything decides to shit itself even though every api etc is exactly the same, and the build fails itself.



  • I`ve had similar encounters with VS from 2010 onwards, which is why I always keep a seperate copy of VS from 2010 onwards installed for all the various different projects. At least VS2010 did try and keep backward compatibility just fine. It is only the later versions that did not rather give a shit about it.



  • Ok. We have had similar issues with nuget. Fortunately for me, I am not much on Visual Studio (anything). Much of life is spent in eclipse environment which is an even bigger maze than Visual Studio.

    I am also working on Foce.com Ide and PyDev in elcipse. Force.com Ide is not coming with debugger. Salesforce is saying give me $30,000 and I will give you debugger. Can you believe this?

    PyDev is poor cousin of pyCharm, but client won't spend money on pyCharm. He want to use this PyDev fullest extent.


  • mod

    @powerlord I concur. It sounds like the .NET 4.0 framework needs to be installed locally, which isn't surprising since the framework is the core of any .NET project.

    @WPT said:

    I`ve had similar encounters with VS from 2010 onwards

    I haven't used 2015 yet, but I have had no issues targeting different versions of .NET from VS 2013.


  • mod

    @lucas1 said:

    The build definition doesn't live in "Program Files (whatever)\VS"

    No, but installing the framework puts the assemblies in your GAC. And any system you plan to install to should have .NET installed, so ...



  • @abarker

    It isn't a framework issue, it is a build definition issue as I had already said in my original post. Installing the framework won't help as VS doesn't know how to build against it as the build definitions are in the VS directory. I could add it but then it won't build on a build agent like jenkins / teamcity / cruisecontrol unless I do some custom shit, and I want to avoid it if I have to.

    I googled for 4 fucking hours and found the same issue with the same lib in github eventually once I knew what the real problem was.

    There is as I said other issues when upgrading to .NET 4.6, which are related to build definitions, AutoMapper and a combination of OS, IDE and .NET versions.

    Unlike some on here I actually fucking investigate before I bitch.

    TBH I am just going to run a Win 7 VM with VS2010 as a last resort if need be.

    This is why I do all my personal projects in python these days ... the shit just seems to work for the most part.



  • @abarker I did not possess a copy of 2013. But I worked with 2012 and 2015. Well, based on my experience, backwards compatibility seems to have gone backwards when the version number increases. Or is it just that it takes an awful time for me to navigate to the goddamn build configurations, before giving up and just text-editing the solution and project files.



  • @lucas1 said:

    This is why I do all my personal projects in python these days ... the shit just seems to work for the most part.

    You are realizing that python code is extremely harder to understand than java /c# code. So future maintenance is gonna be troublesome.



  • Again, I don't know if this is because I have multiple Visual Studio versions or not, but when I go to create a New Project in VS 2015, I can target all of these frameworks:

    0_1458826640289_VS2015 Multitargeting.PNG

    I just assume that I can load projects from these frameworks as well.

    However, having said that, More Frameworks (which currently doesn't link you to the correct page in VS2015) has links to download various targetting packs for VS.

    Of course, right now that page says that VS2015 supports all existing .NET versions 2.0 or newer.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.