Visual Studio Code Cannot Configure Correctly - visual-studio

For some reason, most likely because I do not know how to configure Visual Studio Code. We are talking about the free light version.
It is always showing an error of some type. I am new to this product, NOT VS but this version of it.
How do we set this IDE up correct to work with it?
Here is my current error.
Downloading and configuring the .NET Core Debugger...
Telemetry is: Enabled
log : Restoring packages for C:\Users\Erik Little\.vscode\extensions\ms-vscode.csharp-0.3.7\coreclr-debug\project.json...
info : Committing restore...
log : Lock file has not changed. Skipping lock file write. Path: C:\Users\Erik Little\.vscode\extensions\ms-vscode.csharp-0.3.7\coreclr-debug\project.lock.json
log : C:\Users\Erik Little\.vscode\extensions\ms-vscode.csharp-0.3.7\coreclr-debug\project.json
log : Restore completed in 585ms.
NuGet Config files used:
C:\Users\Erik Little\.vscode\extensions\ms-vscode.csharp-0.3.7\coreclr-debug\NuGet.config
Feeds used:
https://www.myget.org/F/dotnet-core/api/v3/index.json
https://api.nuget.org/v3/index.json
https://www.myget.org/F/coreclr-debug/api/v3/index.json
Telemetry is: Enabled
Error: Can not find runtime target for framework 'DNXCore,Version=v5.0' compatible with one of the target runtimes: 'win10-x64, win81-x64, win8-x64, win7-x64'. Possible causes:
1. The project has not been restored or restore failed - run `dotnet restore`
2. The project does not list one of 'win10-x64, win81-x64, win8-x64, win7-x64' in the 'runtimes' section.
Error:
System.InvalidOperationException: Can not find runtime target for framework 'DNXCore,Version=v5.0' compatible with one of the target runtimes: 'win10-x64, win81-x64, win8-x64, win7-x64'. Possible causes:
1. The project has not been restored or restore failed - run `dotnet restore`
2. The project does not list one of 'win10-x64, win81-x64, win8-x64, win7-x64' in the 'runtimes' section.
at Microsoft.DotNet.ProjectModel.BuildWorkspace.GetRuntimeContext(ProjectContext context, IEnumerable`1 runtimeIdentifiers)
at Microsoft.DotNet.Tools.Publish.PublishCommand.<>c__DisplayClass71_0.<SelectContexts>b__1(ProjectContext c)
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Microsoft.DotNet.Tools.Publish.PublishCommand.TryPrepareForPublish()
at Microsoft.DotNet.Tools.Publish.PublishCommand.<>c__DisplayClass0_0.<Run>b__0()
at Microsoft.DotNet.Cli.CommandLine.CommandLineApplication.Execute(String[] args)
at Microsoft.DotNet.Tools.Publish.PublishCommand.Run(String[] args)
dotnet exited with error code 1
Error while installing .NET Core Debugger.
They make it seem so easy to set up but there is always something that i am missing. I have a very good thought that I am not setting up the configuration file correctly because it looks strange to me. Looks like all JS.
Also if I point to a folder that I work in with no issues at all with visual studio enterprise edition I always get this error
eslintrc-error
It keeps looking for eslintrc but i have looked everywhere to resolve this.
I've posted a snapshot of this issue as well.
I know is must be a config issue.
I do not even know what eslintrc is.
Please advise.

It's a linter for ecma... the rc file configures its options.
So you're aware code is an editor, not really an IDE. If you're looking for free I'd suggest Visual Studio Community.

Related

What causes Visual Studio error CS0518 (UWP app)?

Most of the time I try to build a release version of my application (Publish -> Create App Packages -> Sideloading), the build fails with a whole long list of errors that look like this:
error CS0518: Predefined type 'System.Object' is not defined or imported
I have no problem at all running the application in debug mode, either before or after this happens.
By hours of sheer trial and error, I discovered that the only sure way to clear this error is to go into my project properties and change the Windows target setting to a different version of Windows, then wait for that to take effect, and then change it back. This has become tedious.
Why am I getting this error? Is there a more permanent fix?
Frank

Error in Visual Studio... Extension loading issue

I open up VisualStudio 2017 (latest - just updated). I navigate to a type script file (this might just be coincedence that it's this type of file) and I get the following prompt:
---------------------------
Microsoft Visual Studio
---------------------------
An exception has been encountered. This may be caused by an extension.
You can get more information by examining the file
'C:\...\AppData\Roaming\Microsoft\VisualStudio\15.0_c4122470\ActivityLog.xml'
In my activity log, I get quite a few warnings about packages:
Unexpected system error mode before loading package <enter package name here>
The real kicker is at the end of the file I get an error:
System.NullReferenceException: Object reference not set to an instance of an object.
at
Microsoft.WindowsAzure.StreamAnalytics.UI.ViewModel.JavaScriptFunctionViewModel.GetJSFunctionInputsCount()
at
Microsoft.WindowsAzure.StreamAnalytics.UI.ViewModel.JavaScriptFunctionViewModel.Initialize(JSFunctionInfo configInfo)
at
Microsoft.WindowsAzure.StreamAnalytics.UI.ViewModel.JavaScriptFunctionViewModel.InitializeForEditor()
at
Microsoft.WindowsAzure.StreamAnalytics.UI.ViewModel.JavaScriptFunctionViewModel..ctor(String jsFilePath, Action saveJsFile, Action setJsFileDirty)
at
Microsoft.Cosmos.ScopeStudio.VsExtension.EditorMarginExtension.JavascriptEditorMargin..ctor(IWpfTextViewHost textViewHost)
at
Microsoft.Cosmos.ScopeStudio.VsExtension.EditorMarginExtension.JavascriptEditorMarginFactory.CreateMargin(IWpfTextViewHost wpfTextViewHost, IWpfTextViewMargin marginContainer)
at
Microsoft.VisualStudio.Text.Utilities.ContainerMargin.<AddMargins>b__25_1(IWpfTextViewMarginProvider mp)
at
Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension[TExtension,TMetadata,TExtensionInstance](Object errorSource, Lazy`2 provider, Func`2 getter)
--- End of stack trace from previous location where exception was thrown ---
at
Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
I have tried:
Clearing the temp folder
Clearing the Model Cache inside the VS folder
Updating packages
Updating extensions
Nothing seems to help. Does anyone have a thought as to what would be causing this?
Error in Visual Studio… Extension loading issue
According to the error info "An exception has been encountered. This may be caused by an extension.", you can try to run the VS with safe mode using the command: devenv /safemode, if it works fine, that means the installed extensions caused this issue. Since I could not know which specified extension causes this issue based on the error log, you can try to remove/uninstall the installed extensions one by one to find the culprit.
Besides, you can also try to run visual studio as administrator and update the Visual Studio 2017 to latest version.
Hope this helps.
It appears the bug or issue is cause by the back ticks in your JS or TS code, which were present in the files I was working in.
` <- back tick
Here is a thread in the VS developer community describing the issue and a potential solution.
NullReferenceException after opening javascript file
Solution For Me:
I had to upgrade to VS version 15.8.1 (For me ,the bug was still in version 15.8.0, which is what I was using when I posted the question). This version just got released.
So far things are working properly.

Error MT2001: Could not link assemblies. Reason: Error while processing references

I'm getting this error trying to build a Xamarin.iOS project referencing a .NET Standard 2.0 library.
None of the MT2001 issues online seem to have this specific "Error while processing references" reason, so I'm at a loss as to how to diagnose this. I've tweaked and fiddled about as much as any one person can and stay sane, but I'm really in the dark.
Can anyone out there point me in a direction?
Adding -v -v -v -v to "Additional mtouch arguments" in the project iOS Build settings will help diagnose the issue. After that, you can search the build output for MT2001 and view the inner exceptions. Obviously, each project may differ as to what assembly causes the linker to fail. You may need to add, remove or fix your references based on the output.
For example, I was trying to use SignalR from AspNetCore 2.1, which has a dependency on System.Threading.Tasks.Extensions 4.5.1 in my project, which it seems Mono does not yet support. Mono does not provide its own version of the assembly yet, so when mtouch goes to link the assembly, it's unable to do so and throws an exception:
Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
Removing all references to this assembly (and therefore the whole feauture in my case) allowed the build and linking to succeed.
I've found that I get this when using a Xamarin library that is dependent on System.Reactive 4.1.0. There's a bug in there associated with System.Threading.Tasks.Extensions, and since it is a library I'm writing, I had to roll back to System.Reactive 4.0.0.
For me the error is as follows.
one of the package is mentioned in package.config file but it was not available in packages. So i added the missing package from nuget and the app works fine

ros::init(...) throws an error - Windows roscpp

I'm trying to use ros in cpp with Visual Studio 2012. I wrote the publisher and subscriber tutorial (http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29) and first, I configure the project as says in the guide (http://wiki.ros.org/win_ros/hydro/Msvc%20SDK%20Projects).
Then i compiled an linked the publisher, but when I tried to run it, ros::init(argc,argv,"talker") throws an exception... The console says that I ROS_MASTER_URI is not defined but I've got it defined
There are 2 images here:
https://www.dropbox.com/s/o12m0l38gaxiugi/error1.png -
https://www.dropbox.com/s/ocdmf0wj6rj0962/error.png
Can anyone helps me?
Thanks in advance
So, I had the same issue, although I didn't set the ROS_MASTER_URI globally.
I managed to get around this specific issue by adding
ROS_MASTER_URI=http://localhost:11311
to the debugging environment variables (Project->Properties->Configuration Properties->Debugging->Environment).
However, after implementing the above I got an uncaught exception (Unhandled exception at 0x768bc41f in ros_demo.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x0028f0e4..).
That went away when I built, compiled and ran the project in release mode (which matched my ROS SDK build).
I got the idea for the release/debug build from here:
xstring isn't an OSG specific object, so the error is elsewhere in the
3rd party dependency chain. As I know nothing about your OS and
software setup I can't speculate what this might be.
In general though this type of error could well be a linking issue -
for instance Visual Studio is hopeless at handling different libs
being built debug and release and will crash randomly.
That was fun to discover..

OpenCV_HelloWorld project in VC++ 2010 Runtime Error:

I set up the environment according to this tutorial:
http://opencv.willowgarage.com/wiki/VisualC%2B%2B_VS2010
However the picture they want you to use is no longer there, so I just saved the supplied screen shot with the same name as the original file.
Builds fine, Begins to run but then I get a runtime error
Here is the runtime error:
OpenCV_HelloWorld.exe - Application Error : The application was unable to start correctly (0xc0150002). Click OK to close the application.
I looked in Event Viewer and found that it also set off a another error but did not announce
Here is the unannounced error:
Activation context generation failed for "C:\OpenCV2.1\bin\cxcore210d.dll". Dependent Assembly Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found. Please use sxstrace.exe for detailed diagnosis.
As you can see it says to use sxstrace.exe however I don't appear to have that program. After a quick Google I read that the program was included in the Microsoft Windows Platform SDK, so I'm downloading the most relevant version (windows 7 version for c# and .net) and installing that to follow up on that, I'll post what I find as it comes.
Any help is very much appreciated
Unexpectedly the project builds and runs now. The only modifications made were removing spaces in the c++ directory and linker options from the tutorial. External changes were the completed installation of the windows platform SDK, however OpenCV has no dependencies with windows platform sdk. I am unsure how it was resolved, but it's no longer a problem.

Resources