Problem with Visual Studio and .NET framework - visual-studio

From a few days ago I'm facing annoying problems with Visual Studio and .net framework.
First I couldn't use breakpoints, but after a few changes I'm able to.
Yesterday, I've changed my Model of Entity Framework and renamed a few columns. Now the web server assumes that no change have been made.
I've made a simple test: removed a condition that I had in my masterpage where I checked a session and created a breakpoint there, when I run it VS goes to the breakpoint, the condition isn't there but he keeps working like it was.
I've tried to use the fusion log to check assembly errors on run time but none give me errors.
I can only assume that I'm not running the "newest" version of the project but I don't know why.

It sounds like your dlls are out of date. Try using the option "Clean Solution" and then re-build the solution.

Related

Visual Studio (Community 2019) throwing errors which should be warnings regardless of settings in one project only

A couple of weeks ago I cleared the NuGet cache in Visual Studio... this broke everything for some time as it would not automatically restore all the NuGet packages for some reason.
After a lot of effort and manually restoring stuff, I have now got most projects in my (quite large) solution working, except one.
I am in the process of moving most of my code from .NETFramework projects, to .NETStandard and the websites to .NETCore, that in itself is a headache and may/may not be related to the problem, but I don't think so.
Anyway, this one project, which is a .NETFramework (4.7.2) web application and references many other projects in my solution, will not build properly.
Each time I build it, I get thousands of stupid errors from MSBuild, see the screenshot (ignore the top 4,they are genuine!). These are all errors which should be warnings, or ignored.
In the Project settings page I do NOT have "treat all warnings as errors" checked - in fact, in an effort to fix this, I have turned warnings off altogether as well.
The weird thing is, that if I build every individual project in the solution first, usually twice, and then build this one with out touching anything else, it then will build and launch in IIS (or publish)
So the site is actually working but something is wrong in MSBuild or VS that is breaking it.
I have tried running a Visual Studio repair, but that made no difference either.
EDIT also, it only does it on one PC, if I load the same solution onto my laptop, it will all build fine.
And from some of the errors, if seems that the you should change the Assembly Name of the SAM project to Sam. It is quite strange. Not sure whether you have install some extra Code Analysis extensions on your current PC but other PCs works well.
So please try the following steps:
Steps
1) disable any third party installed vs extensions under Extensions-->Manage Extensions-->Installed
It needs a restart.
2) run update-package -reinstall under Tools-->Nuget Package Manager-->Package Manager Console
3) close VS, delete .vs hidden folder under the solution folder, every bin and obj folder of the projects under the solution.
Besides, you could use devenv /safemode to start a initial VS without any third party tools to test whether the issue happens.

Visual Studio 2013 New Project .csproj not supported

When I try to create a new Windows Forms project, I get the " ....csproj cannot be opened because its project type (.csproj) is not supported by this version of the application" error. The .csproj file it is referring to is in AppData\Local\temp\randomname\Applicationname.csproj but that file does not actually get created.
I know that when this error crops up with opening projects created in previous versions, it's usually a missing library that is used by that particular project but for the life of me, I cannot figure out what library I could be missing here as it is a new project.
I have VS 2013 Ultimate installed with all components.
Running on Windows 8.1.
First confirm it is not a add-on or a problem with Visual Studio itself.
Try and start Visual Studio from the command line with devenv.exe /resetskippkgs and also try disable any IDE extensions temporarily to see if one of them might be stepping on something. Do these two things first to see if the problem lies with VS IDE. Of course try creating a project after you have done these two things and see if you get the same results.
I never figured out what the actual problem was but I've installed Update 5 which was only released less than two weeks ago and it's working fine now.

Dotfuscator 4.10 project in VS 2012 bugs while trying to save .dotfuproj file

I recently installed Dotfuscator 4.10 on my computer and I already has VS 2012 working on it. Everything worked fine up to the point when I tried Dotfuscator embedded in VS (I mean the standalone GUI app works perfectly).
Just for the try, I created a small solution (no TFS/VSS) with a C++ /clr app, a C++/clr dll and a C# app.
I then added a Dotfuscator project. To this project I added the output from the three dll/exe other projects.
When I tried to rebuild the solution, I was asked to save the .dotfuproj file. Strange and abnormal behaviour, the file should be saved automatically and without prompting me. OK, I chose to overwrite the existing file (what should have been done automatically after all.) I got the error Object reference not set to an instance of an object. I had to cancel the operation and could not build the solution.
Note that I observed the same behaviour if I tried to save the dotfuproj file under an other name. Also, the file is not R/O.
My question: has someone experienced this problem? Any solution? Thanks for your help!
You can try deleting your Dotfuscator project and then creating a new project. If that does not work, try using direct input to the Dotfuscator project, rather than using the output of another project within your solution.

WP7: Why does Visual Studio automatically check out WMAppManifest.xml?

I'm working on a WP7 project and noticed that VS constantly checks out WMAppManifest.xml. As far as I can tell this happens regardless of what type of code change I make. Is it possible to prevent this behavior or is it necessary?
Same thing here, the file is checked out every time I build a project and it is not modified. The file is always the same as before. I am using TFS. Looks like a bug.
This appears to be fixed with the latest Mango tools released with the 7712 build.

Visual Studio 2010 gets stuck with solution with MVC3 Razor and Azure

I've a solution with several .dll projects, an Asp.NET MVC3 Razor project and an Cloud project.
If I try to compile the solution with the Cloud project loaded, VS2010 gets stuck in "Buil started".
I have to forcefully close VS2010 killing the process and restart. Then the compiling works good once, the next time it will get stuck again.
If I unload the project and set the mvc project as start-up, everything works (but azure of course).
What could be the problem?
Cheers.
Was it by any chance an ASP.NET MVC project to which you added a CloudService project later on or did you start off with a CloudService from the very beginning?
I was in the former situation and I had no end of problems, like not being able to open property pages or deploying the application. It's not quite your issue, but the following article might help:
http://tomkrueger.wordpress.com/2010/07/27/azure-deployment-issue-after-upgrading-to-visual-studio-2010-and-net-4-0/
As I say, my problems started because I actually added an Azure project to an existing ASP.NET MVC solution and there were some unnecessary settings left over in the web.csproj file.
All I had to do was open web.csproj in notepad and remove all occurrences of the <PlatformTarget> element.
My MVC prjoject was x86 and of course Azure works on x64 only. Even though I had the platform target set up as AnyCPU somehow Azure couldn't quite get along with it.
Maybe cleaning up your project files helps as well.

Resources