I have a rather unpleasant problem since yesterday...
I cleared my NuGet chache because I couldn't get a NuGet-Package to work with one of my codes. But it didn't help and instead f***ed up the UWP apps I wrote before that.
I get errors for every element I have in my code like this:
In XAML it's mostly "XXX is not supported in a WIndows Universal project" and in the .cs files its a lot of "Cannot resolve symbol XXX"
How can I repair this?
I can compile and run my code just fine but I can't work with the code when everything gets detected as an error in VS and I can't see my UI while designing it...
I could really need some help here :/
Just putting this here... I had the same problem suddenly.
Updating the NuGet package for Microsoft.NETCore.UniversalWindowsPlatform fixed it for me instantly.
Ok I don't really know why that happend but I found my answer...
I tried restarting VS which didn't solve problem.
I tried restarting my PC which didn't solve problem.
I tried to build my code which didn't solve problembut no errors while building.
I tried to run my code which didn't work but app opens without a problem.
Next step confuses me a bit...
My Code is divided into 2 projects. One for all the XAML files and one for all my code files like Helpers, Converters, Collections...
I opened the NuGet-Manager in the second project and looked for possible updates to my packages. There was an update for the Fody-Package which I installed right away. Now everything seems fine again...even in the XAML project...
I don't understand why it works but it does :/
Related
In short, for some reason I can not figure out, two empty errors appear in my log. These persist after clearing, on restart and occur in every project, both existing and new. Un- and re-installing Unity seem to have no effect whatsoever.
This issue started appearing for me in Unity 2019.2.1 and persists even after updating to the most recent 2019.2.14f1. Because they are errors, they prevent me from running or building the project which means I am completely stuck and can not use Unity until I find a way to fix this. I am using Windows 10.
I have already submitted this issue to Unity, but I think it is an issue with my installation, so I don't know if they'll be able to help me.
The issue appeared in one project and seemed to be contained to that one project until I attempted to build another project. The moment I try to build a project, the issue appears and will persist no matter what I do. Even if a project is completely empty and brand new, the moment I attempt to build the project, the errors appear and the project becomes "cursed" with them.
Something that might be the cause, but might also be a symptom, is that scripts will indicate that they can not find UnityEngine. Is there any way to manually install those libraries?
Even after manually uninstalling Unity, Visual Studio and removing all references to Unity from AppData, then installing the most recent versions of Unity and Visual Studio, the issue persists.
I have not been able to test an affected project on a different computer, but I will update this question if I do.
If Unity does get back to me with a solution I'll post that.
Edit:
The true cause of the issue was that for whatever reason, Unity could not find Roslyn. Hence why scripts were unable to compile, which resulted in the Unity Editor itself being affected.
I've added the solution to this issue as an answer to this question.
This issue has been solved with a response from the Unity team!
This is their solution:
Please try the following steps to fix the issue:
1. Close any open Unity Editors
2. Go to "C:\Program Files\Unity\Hub\Editor\(Your Unity version)\Editor\Data\Tools\RoslynScripts"
3. Edit "unity_csc.bat" (You might have to run Notepad as an administrator to be able to save it)
4. Replace the line that says "%APPLICATION_CONTENTS%\Tools\Roslyn\csc" /shared % with the following: "C:\Program Files\Unity\Hub\Editor\(Your Unity version)\Editor\Data\Tools\Roslyn\csc.exe" /shared %
Leaving it here for any future Google searches.
I am having the exact same issue/error as this post from yesterday. Similar SO Post
SIDE NOTE...As you can see, I am new and therefore, only have 45 reputation. As such, I could not simply add a comment to the above existing post and had to create a whole new post even though they are the same issue....seems silly. But I digress....
I wanted to provide additional comments in the hopes to get an answer. My issue started suddenly the a few days ago. I made no major changes to references, VS updates, etc... However, when I right click my csproj in visual studio, I get the error and I have to click it five times before it goes away, at which point I finally get the menu.
Again, I have made no major changes BUT I went ahead and confirmed that:
My target version and Min version is Windows 10(10.0; Build 10586). That is the SDK version that I have installed and am using.
I verified that my NuGet updates are complete and that my Microsoft.NetCore.UniversalWindowsPlatform are installed and update to date (5.2.2 as of now).
I do have a reference also to "Universal Windows". This was created automatically when I created my project and I cannot remove this reference but it is there. When I select it, I do see that it is "UAP,Version=10.0.10586.0" so this should be good. I do notice a possible issue here. Again, this reference was created for me and I cannot remove or change it. However, it is pointed to a folder named
C:\Program Files(x86)\Windows Kits\10\References\Windows.ApplicationModel.Calls.CallsVoipContract\1.0.0.0\
Why did the Windows Universal reference default to that folder and only that folder? I am not using VoIP so I wonder why it chose this one? Also, what if I need some of the other references in the References folder?
I created a brand new Windows Universal project and the same error happens on a fresh project.
Please help, it is annoying. Project still seems to build and work fine though.
Thanks!
I found the issue in my case, it was an extension that I added on to Visual Studio provided by SyncFusion (which their installer actually creates 7 or se extensions in Visual Studio). After troubleshooting my issue and doing some of the same things to resolve (repairing .Net, SDK, Visual Studio) I then thought about the error a bit more. While it is cryptic (and has poor english "An Exception has been occured") these are all clues that it could be any of the frameworks that I have installed via extensions as well.
I also had another clue, the issue started happening a few weeks ago, around the time I updated my SyncFusion controls to the latest version.
So, I went to Tools > Extensions and Updates. I went to Installed > All and found all of the SyncFusion items (there are several) and disabled them all. After I disabled them, and restarted Visual Studio, the problem went away!!!
This is a workaround for now. In the meantime, I put in a support ticket with SyncFusion on the issue. I will certainly update this thread when I get a response from them. Also in the meantime, I then went back and re-enabled each of them again, one at a time, to see who the real culprit was. In my case it was the SyncFusion Web Conversion and Migration extension.
If any of you are not using SyncFusion but having odd Visual Studio issues such as this, I suggest doing something similar by going through your extensions and disable any that you added on, starting with the most recent add ons, especially if they were added around the same time you started having the problem until you find the culprit.
Hope this helps!
I have been using Managed DTS runtime assembly in VS2012 to control an SSIS package from a C# windows app for testing. Everything works fine.
I try to copy the code to run from a Console app (for production reasons ) and nothing works the SSIS package runs and executes with succes but nothing actually happens.
I had to reinstall VS2012 to fix another error and I am assuming I have missed something when I have reinstalled but cant see what it is
The original app still works after reinstalling VS but the new app does not connect to the SSIS package at all.
Can anybody point me in the right direction ?
Apologies guys
was quite frustrated yesterday and forgot the basic rules of posting questions
I managed very late last night to fix the problem
I had forgotton to put
in the app.config file
It now works fine ... duh (6 hrs wasted)
this is a reminder why we comment code , cause we forget things like this when we copy the code
I appreciate the answers/help
thanks
I have a friend who has made some code in visual studio. But when I run his code (after getting it with git), I get Error Code CS0433. The weird thing is another guy on our team can get the exact same code and run it just fine on his computer. Here is a screen shot of the errors:
CLICK HERE FOR A BIGGER PICTURE
What is even more weird, another friend working on a different branch also gets Error CS0433 when running his code. But I can get it and run it just fine on my computer.
I have tried a couple of things to no avail.
Rebuild the solution
Clean solution
Manually deleted bin and obj folders, then do a clean/rebuild
I looked around the web for a solution. I found some people with similar problems, but theirs are in ASP.NET and not .NET. See here and here.
I have also taken a look at the documentation at MSDN on error CS0433. But I'm a beginner find MSDN's explanations very cryptic...
Is there anyone who has an idea as to what is causing this problem and/or a solution on how I can fix it?
If you need additional information feel free to write a comment. I will supply it as fast as I can.
You have references to dotnetcore50, and system.dll. This is causing (I think) most of the problems.
Try removing all the dotnetcore50 references. Start with vanilla .NET and try and migrate to the core libraries slowly. This [blog.marcgravell.com/2015/11/… might help.
I am creating a WPF application. I have worked on it for more than 6 months with no problem, but now, suddenly, any modifications I make on the interface, will not be updated after I build.
I am using VC# Express edition.
I tried other projects and they work fine.
Have you tried cleaning the solution and performing a full rebuild?
Clean solution is found in the "Build" menu.
Maybe you have errors, and disabled the message, telling you about these errors, then the debugger runs the old version without errors.