Microsoft.Build.Utilities.Core assembly not found - c#

Basically, I'm trying to create an MSBuild Task by inheriting from Microsoft.Build.Utilities.Task. See here for Microsoft's documentation on the class. The error shown is that the Utilities name doesn't exist in the Microsoft.Build namespace.
I know in the image I'm trying to reference Microsoft.Build.Utilties.Core but this was just due to troubleshooting. Utilities is not found. You can see on the right in the image that I've got a reference to Microsoft.Build.Utilities.Core, which I recently installed from Nuget. I've also tried the Visual Studio Installer, checking the box for developing Visual Studio Extensions. Not sure what I'm missing here.

And as it turns out, I had managed to confuse my project names. The project I had added the reference to is not the same as the project this file is in. Oops.

Related

Visual Studio 2017 - Unable to add "ReportViewer" to "Windows Form"

I know this question is exactly the same as this but even after following it's solution i am still stuck up with this error
error CS0234: The type or namespace name 'Reporting' does not exist in
the namespace 'Microsoft' (are you missing an assembly reference?)
Things i did to install Report Viewer
I followed the below link to install the report viewer
Download and Install Report Viewer For Visual Studio 2017 - YouTube
(this link shows how to install it from NuGet Manager and Extensions and update)
and i was able to make a Report as well as add Report Viewer to my Windows Form
but i am getting the above mentioned error on building the program
Solutions i have tried
I tried re-adding the reference by right-clicking on References folder in my project and then selecting Add Reference. and then adding Assemblies > Extensions > Microsoft.ReportViewer to the references.
I tried unloading the project and changing it's .csproj file and manually mention the version
Also cleaned the whole solution and manually removed any other remaining files in the output directory and rebuilding it.
BUT
when i try to see the designer of the form in which ReportViewer has been inserted then the Tooltip says that it is recognizing the namespace
Now, I am left with no solutions now. Any piece of advice will be appreciated.
Maybe you should try to use NuGet Package for install Reporting Service on your Winform application.
I use this NuGet and it's working fine for me.
Microsoft.ReportingServices.ReportViewerControl.Winforms
The answer was to change my .Net Framework from 4.0 Client Framework to 4.0. I guess it needs full features of that framework rather than the client version for it.

ApplicationInsight does not exist in the namespace Microsoft

I've been working my way through video training series on Microsoft's Virtual Academy. The series I'm watching is titled "Windows 10 Development for Absolute Beginners" I'm at the penultimate video when I ran into a problem. Bob Tabor put the following into the constructor of the App class (in App.xaml.cs):
Microsoft.ApplicationInsights.WindowsAppInitializer.InitializeAsync(
Microsoft.ApplicationInsights.WindowsCollectors.Metadata |
Microsoft.ApplicationInsights.WindowsCollectors.Session);
However, this line doesn't work at all for me. I'm getting red squiggly lines under Microsoft.ApplicationInsights. And when I compile I get the following error message:
The type or namespace name 'ApplicationInsights' does not exist in the
namespace 'Microsoft' (are you missing an assembly reference?)
I have tried to add a reference to that, but it didn't work. In fact VS 2017 told me outright that it was impossible to add the reference I'd found.
I'm thinking that the problem is because I'm using VS 2017, whereas when Bob Tabor did the videos he was using VS 2015. Something has changed in the configuration, but I don't understand what. I'm sure the issue is that I need to include some sort of NuGet package. I'd be delighted to do so, only I've no idea what NuGet package to install.
I'm developing for Windows 10, using Visual Studio 2017 Community Edition.
For the "Windows 10 Development for Absolute Beginners" series videos,there is a correspondent sample here. If you opened one project you are referenced and build, you will find there are three ApplicationInsights relative Nuget packages referenced, and one ApplicationInsights.config file in the project. This should caused by when OS build is 10240, you create a new Windows 10 universal application in Visual Studio that a reference to Microsoft.ApplicationInsights is added to the references folder automatically. And after that, new builds coming without adding this package automatically.
So that if you just need the error gone you may add the same three Nuget packages:Microsoft.ApplicationInsights 1.0.0,Microsoft.ApplicationInsights.WindowsApps 1.0.0,Microsoft.ApplicationInsights.PersistenceChannel 1.0.0 manually.
But actually, Microsoft.ApplicationInsights is not supported UWP app starting 2.0.0. Currently you should not use ApplicationInsights for UWP app which may be deprecated, but use HockeyApp SDK instead.

Quiksoft.EasyMail.SMTP reference not found in visual studio 2015

We recently started using Visual Studio 2015 at work instead of 2013, and now we have found an issue that some of our projects are not building due to some references not being found, nothing has changed at all, just using vs2015 instead of vs2013.
One of the references is Quiksoft.EasyMail.SMTP, the error is the classic "The type or namespace name 'Quiksoft' could not be found (are you missing a using directive or an assembly reference?)"
Me and a couple of coworkers have been trying to solve this, searching in the internet and we have not found why this is happening. We have the dlls (for example SMTP.Net.dll) and it is included in the References of the project.
We are out of ideas at this moment.
Have any of you had this issue in vs2015. I'm using this library as example but I wonder if there are more issues with vs2015 loading/finding references.
I hope is something silly and just need to turn on/off an option in vs2015.
Thank you in advance for the help.
Because your older project had a reference to the dll. Look in the bin folder of your old project or the lib folder if you have one, there will be a dll for it. Right click on references, "Add Reference" and navigate to the dll. Quicksoft is not a native assembly. You will most likely have to update the license on it as well.

The type or namespace name '"Namespace"' could not be found in the global namespace (are you missing an assembly reference?)

I am trying to build my project by referencing private project using VS2012, it builds successfully on local machine, but I am trying to use Visual Studio Team Services (previously Visual Studio Online, Team Foundation Service) and the build agent set up by Microsoft does not find the namespace.
Tried to re-reference by reading other posts as well checking that target framework is set on all projects to .Net Framework 4, but nothing seems to work, am I missing something ?
Ok, So I solved the issue, the Visual Studio Team Services error log said that the project was not building because the build configuration was wrong and not assigned to building process, it was set to x86 I change it to Any CPU and now it was build successfully, hope this helps to someone.
if your solution have .cs files i.e. class libraries then build that library separately by right click on it and choose option build, then add reference to the website then it will be cleared.

Added JWT with nuget, but why does error list still says jwt does not exist in the current context? [duplicate]

I am using the MagicLibrary for a few components. I knew it was written in Visual Studio 2003 and recompiled it in Visual C# Express 2010. It compiled just fine and I could see the library in the folder.
I then created a new project in Visual C# Express 2010 and added the components MagicalLocalLibrary.dll to the Toolbox. They appeared fine with no errors. I put in a control from the Toolbox to my form, and it seemed fine. I then debugged (to see if any errors would occur) and I saw that the reference MagicalLibrary disappeared and I got the error:
The type or namespace name 'Crownwood' could not be found (are you missing a using directive or an assembly reference?)
The thing is that, the reference shows fine under References in Solution Explorer but I can't import it with using or use it in the code (simply is not listed in InstelliSense either) but if i go into the Object Browser and choose "My Solution" it is not listed. I can click on the Reference in Solution Explorer and just change the Copy Local property to True or False, then it will appear in the Object Browser but whenever I debug my project again it disappear.
Any idea why it does this? Thanks in advance.
Check that you are using the .Net 4 framework and not the client profile version
You find that setting when you right-click on your project, choose properties. And under application there is a setting for target framework. If you have chosen the .Net 4 framework Client Profile, then this behavior that you described can happen
I ran into a very similar issue once. In my case the problem turned out to be a missing dependency for the "vanishing" namespace's assembly. What finally gave me the information I needed was the suggestion in this StackOverflow answer to raise the MSBuild output verbosity level. After raising the verbosity setting the IDE should give you a more specific reason why the compilation fails.

Categories

Resources