Unable to find reference to project in same solution VS 2015 - asp.net-mvc-5

Having upgraded VS2015 to SP1 my local project references in my solution could not be found. I set the project build order, rebuilt all the projects and also created a new solution but still bad references.
Any ideas please?

I resolved this by ensuring that the target .NET Framework for all the projects in the solution, that were referenced, were the same.

Make sure that you are running VS with administrator mode, then rebuild the entire solution.

Related

Prevent Visual studio 2017 from copying almost 100 unnecessary system dlls to output folder for dll project

I made a new .NET Class Library solution if TFS, and added a bunch of preexisting classes that were developed for a windows forms application. Basically just dumped the old folder in. The forms app worked fine and the folders in bin were expectedly barren, apart from the exe and the required nuget references. The dll build however copies over libraries all the way from Microsoft.Win32.Primitives.dll, to System.Xml.XPath.XDocument.dll for no apparent reason. I have removed unused references with ReSharper and commented out unnecessary using statements. No difference whatsoever. I don't think it's a problem from the deployment perspective, it's just annoying to have so many files copied over each build. Could it be that the initial presence of Forms just poisoned the new project forever? Any help whatsoever would be much appreciated.
Prevent Visual studio 2017 from copying almost 100 unnecessary system
dlls to output folder for dll project
Please check if your VS2017 is very old and also check if the framework version of your project targets to 4.6 or 4.7.1.
If so, there is an known issue about this issue.
This is a .net standard 2.0/net 4.6/4.7.1 issue which was improved in 4.7.2. You can check this similar issue.
Suggestion
1) you should first update your VS2017 in case some updates fix it.
2) change the framework version of your project to net framework 4.7.2.(if you do not have net frameowork 4.7.2, you should install it in the VS Installer)

WPF/Catel :The name 'InitializeComponent' does not exist in the current context

When I check out the latest source from one of the sample projects of Catel (Logviewer/CsvTextEditor) and I build my solution.
I get a lot of build errors.
All of these error are related to one error:
The name 'InitializeComponent' does not exist in the current context.
I've both tried to build the solution in Visual Studio 2017 (15.9.11) as well as Jetbrains Rider.
Can anyone help me with this issue?
Some of the libraries require .net core 3.0 (see https://github.com/dotnet/core-sdk) and might require VS 2019 prerelease.

References and .dll missing from TFS get latest

I'm having an issue related to team foundation server with Visual Studio 2012.
I've checked in a new solution to the server, however when i get latest version for other machines, most of the references are missing and the .dll files in the bin cannot be located.
Is this because the files are not being pushed when i check in.
Any help is appreciated thanks
In Solution Explorer, right click the DLLs that aren't being included, go to Properties, and be sure that the Build Action is set to "Content".
Check whether you are using MSBuild-Integrated solutions or using Automatic Package Restore. If you use MSBuild-Integrated solutions, migrating MSBuild-Integrated solutions to use Automatic Package Restore.
If you haven't used Nuget to restore package. Check: https://docs.nuget.org/consume/package-restore
Check whether your project link to other projects. Don't reference output assemblies. Make a project reference or create a NuGet package.

Project is targeting frameworks not installed or are included as part of future updates to Visual Studio

I am attempting to convert the Microsoft.Health C# class library that is installed as part of the HealthVault SDK, using instructions provided here. After following these instructions, I get the following error when attempting to load the project into Visual Studio 2013.
"The project is targeting frameworks hat are either not installed or
are included as part of future updates to Visual Studio. See
http://go.microsoft.com/fwlink/?LinkId=287985"
Visiting the link takes me to .NET SDKs and Downloads. Once there, I have no clue on what needs to be done.
I do realize that one will have to leverage the Portable Class Library Contrib project to fill in some missing bits, especially code related to System.Security. This, I will deal with later.
Any one run into a similar problem?
Maybe so late but for those who have the same problem.
I had the same error in a project which was working perfect before updating VS2013 and finally after 3 hours looking for the source of the error I found that the error is about TargetFrameworkProfile.
In my case I sloved it like so:
Right click in the unloaded project in your solution and click Edit.
Find the TargetFrameworkProfile tag and set it as below:
<TargetFrameworkProfile>Profile78</TargetFrameworkProfile>
At a guess, this is because you need to specify the TargetFrameworkVersion and TargetFrameworkProfile properties in the project file. Compare the .csproj you are trying to create to a newly created PCL project file, and make sure that everything that's not specific to your project matches.
I ran into the same issue and got it resolved by installing the latest Visual Studio Update

MSBuild now failing to resolve references

We have a few projects within our CI environment which have been building successfully. Over the weekend, our IT team installed Azure SDK udpates, and since then, our project to not build anymore (even though they don't reference Azure).
The way we are building projects is
<MSBuild Condition="'$(BuildProject)' != ''" Projects="#(Projects)"
Properties="Platform=$(Platform);Configuration=$(Configuration);OutDir=$(TempProjectFilesPublish)\bin\;WebProjectOutputDir=$(TempProjectFilesPublish)"
Targets="Build"
ContinueOnError="false">
where #(Projects) is a reference to the Solution folder.
<Projects Include="$(BuildProject)"/>
The issue is around resolving project references. Nothing has changed over the weekend. The project references are correct, the csproj file has the appropriate values, no new projects or code changes have been made which is leading me to think something has been disrupted.
Wondering if anyone might know of any changes to MSBuild that would affect this?
This issue ended up being a bug in Azure SDK 2.3 with a conflict to Newtonsoft.JSON dll.
The SDK installs a 4.5 build version into the GAC, which is overriding any Newtonsoft references in projects to 4.0.
https://connect.microsoft.com/VisualStudio/feedback/details/850425/windows-azure-vs-tools-breaking-msbuild-for-web-projects
Microsoft have stated this will be fixed in 2.4.
I experience the same problem with Azure SDK v2.9. I've fixed the build for the moment by uninstalling "Microsoft Azure Library for .NET v2.9".
P.S.: Unfortunately, the link provided in the answer by mickyjtwin no longer works.
P.P.S.: The following question seems to be related:
Visual Studio keeps overwriting NewtonSoft.Json.DLL with an older version

Resources