I'm learnig how create add-ons for VisualStudio.
First I downloaded this extension:
Microsoft Dynamics AX 2012 X++ Editor Extensions
(finally I needs a extension to the X ++ editor, hence the choice)
The extension works fine - I'm trying to edit it.
The project loads fine (I'm using Visual 2022), but when I try to compile it crashes into the Microsoft namespace.
For example:
The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
The type or namespace name 'IAdornmentLayer' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'IWpfTextView' could not be found (are you missing a using directive or an assembly reference?)
I tried to solve the problem by adding the library Microsoft.VisualStudio.QualityTools.UnitTestFramework to the project, but then I got next errors.
For example - I have in project:
using Microsoft.VisualStudio.Text.Classification;
using Microsoft.VisualStudio.Text.Editor;
This generate errors:
The type or namespace name 'Text' does not exist in the namespace
'Microsoft.VisualStudio' (are you missing an assembly reference?)
For test I change target framework from .NET framework 4 to .NET framework 4.5 (and change node SupportedFrameworkRuntimeEdition in \obj\Debug\extension.vsixmanifest file) - in this configuration compiling is done correctly (but extension not works in X++ editor - so this not resolve my problem).
I'm using
Microsoft Visual Studio Community 2022 (64-bit) - Version 17.3.4
Windows Server 2012 R2
How can I solve this problem?
Regards,
Tomasz
I created Virtual Machine with Windows 7, installed Visual Studio Professional 2010 SP1 + SDK - on this setup everything works fine.
Related
I am working to fix an old plug that need some minor text changes.
I am using Visual studio 2022. When I compiled the C# code, this line of code is marked as having an error.
using Microsoft.Xrm.Tooling.Connector;
Error CS0234 The type or namespace name 'Connector' does not exist in the namespace 'Microsoft.Xrm.Tooling'
My .Net Framework is 4.6.2 and the version of the Nuget Package Microsoft.CrmSdk.XrmTooling.CoreAssembly is 9.1.1.1
Appreciate some guidance, on how I can resolve this.
Thank you so much.
David
I tried different version of Microsoft.CrmSdk.XrmTooling.CoreAssembly . None of them worked
I am building a project in .NET Core where I need to use the Framework Assembly System.Web.Extension. I install the assembly via Reference -> Add Reference -> System.Web.Extension 4.0.0.0. After it installed it appears under DNX 4.5.1 -> FrameworkAssemblies. Package restoration was successful as well.
Following entry is added in project.json file as expected.
"frameworkAssemblies": {"System.Web.Extensions": "4.0.0.0"}
But when I am trying to compile the project using dnu build, following error appears!
D:\Projects\ColemanApi\src\ColemanApi\Controllers\ValuesController.cs(7,14): DNXCore,Version=v5.0 error CS0234: The type or namespace name 'Web' does not exist in the namespace 'System' (are you missing an assembly reference?)
D:\Projects\ColemanApi\src\ColemanApi\Controllers\ValuesController.cs(51,27): DNXCore,Version=v5.0 error CS0246: The type or namespace name 'JavaScriptSerializer' could not be found (are you missing a using directive or an assembly reference?)
I was following this post but it does not have a solution for .net 5 or I don't know how to Copy Local in .net 5 as I did not see any Properties option in Assembly's fly-out menu.
Please see attached image:
And here is a screenshot of the compilation error:
Somebody please help. I am totally screwed up!
UPDATE
I ran dnu list and it shows the System.Web.Extensions is resolved. Please see the screenshot below:
Thanks in advance.
If it does, is there any alternative solution to deserialize a JSON string without removing "dnxcore50"?
JSON.Net provides this functionality. If you want to use this on Core...
https://github.com/JamesNK/Newtonsoft.Json/issues/618#issuecomment-186441534
There won't be any progress until .NET Core RC2. When it is released I'll create a netstandard build and release a new version of Json.NET.
I have some missing assemblies in my PC, and don't have any idea how to fix it.
When I create a new ASP.NET MVC 4 internet application from template (using VS 2012) everything works fine. As soon as I try to integrate Web API controller I get a missing assembly reference error. For example, when I create application using ASP.NET 4 Web API default template and click "API" on the interface I get Compilation error:
Compiler Error Message: CS0234: The type or namespace name 'Description' does not exist in the namespace 'System.Web.Http' (are you missing an assembly reference?)
I have checked the assembly and everything seems to be fine. It's in version 4.0. I have .NET framework 4.5 installed on my PC. Where should I look for the reason of the issue?
I saw this same error code (different missing reference) when compiling a PCL using msbuild but not when building via Visual Studio:
error CS0234: The type or namespace name 'Storage' does not exist in the namespace 'Windows' (are you missing an assembly reference?)
In my case it was caused by a 'using Windows.Storage;' statement that was not actually referenced by any code in the file. I removed the line and the error was fixed.
I am trying to set up an OData service for a company Team foundation server. I have used a few versions but this one seems to be missing a reference that I can not locate anywhere. The 2 classes that i seem to be missing definitions for are - BasicAuthToken and BasicAuthCredential both are throwing an error -
The type or namespace name 'BasicAuthToken' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'BasicAuthCredential' could not be found (are you missing a using directive or an assembly reference?)
Does anyone know where these can be referenced? The Odata service can be downloaded HERE!
I've got the same problem. My solution:
On ODataTFS.Model:
switch the target framework to 4.5
replace all teamfoundation* references to version 12. The Microsoft.TeamFoundation ver 12 don't exists, remove it.
add Microsoft.TeamFoundation.VersionControl.Common.Integration (ver 12)
add Microsoft.VisualStudio.Services.Common (ver 12)
On ODataTFS.Web:
switch the target framework to 4.5
replace all teamfoundation* references to version 12.
After that you can use only the ctrl+'.' to resolve the build errors.
I have a Windows Server 2003 box with teamcity that I use as a build/deployment server. I checked in a new asp.net mvc 4 project and it is crapping out with the following errors:
App_Start\BundleConfig.cs(2, 18): error CS0234: The type or namespace name 'Optimization' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Controllers\AccountController.cs(8, 7): error CS0246: The type or namespace name 'DotNetOpenAuth' could not be found (are you missing a using directive or an assembly reference?)
Global.asax.cs(7, 18): error CS0234: The type or namespace name 'Optimization' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Models\AccountModels.cs(4, 45): error CS0234: The type or namespace name 'Schema' does not exist in the namespace 'System.ComponentModel.DataAnnotations' (are you missing an assembly reference?)
App_Start\BundleConfig.cs(9, 44): error CS0246: The type or namespace name 'BundleCollection' could not be found (are you missing a using directive or an assembly reference?)
I've already installed asp.net mvc 4 on that box, restarted the machine and tried everything else without any luck.
Any ideas?
For me, my CI server (TeamCity) wouldn't take MVC 4 via the Web Platform Installer. Dunno why.
So I checked the TC build logs logs for the yellow warnings, looking for references its trying to resolve.
For each one, I then looked for the corresponding NuGet package in the project/solution and reinstalled it. This sets it up with package restore so that TeamCity/MSBuild restores it during build.
For example:
Update-Package WebGrease -Reinstall
The MVC project template, although it uses NuGet packages, they're not wired-into the whole package restore mechanism for some reason, so reinstalling them forces this. Effectively, I suppose you're installing MVC 4 via its constituent packages.
Luke
A few things I would look in to:
Make sure that your NuGet packages are being pulled down appropriately during the build. Documentation
Make sure that the project is not still referencing the old MVC 3 assemblies somewhere. Perhaps a nant/msbuild build script is copying the old assemblies somewhere?
I am not sure if this will be helpful. But I had same problem. What I was trying to do is using EnableNuGetPackageRestore I was trying to restore it and some where it was causing problem (Restoring nuget packages from Test project rather than MVC project. I am not sure why but if I found out I will surely update thread). What I did is I followed blog from http://blog.jetbrains.com/teamcity/2013/08/nuget-package-restore-with-teamcity/. Adding one more build step NuGet Installer helped me fix issue. (Caution: If you are using internal nuget package server than you need to specify same in Sources). Please let me know if you have still problem and I can be of any help. Happy Building !!