Silverlight project fails to compile - c#

I have a Silverlight 3 project in VS2008. Today, for whatever reason, I get an error when compiling.
Configuration system failed to initialize
It reports the error on Line 1, Column 1 for every .xaml file in the project.
I did a repair on VS2008, reinstalled all the Silverlight 3 bits (e.g. SDK, VS2008 tools and the Controls Toolkit), but the problem still persists.
Am I missing something simple?

If you have source code control for the project, please roll back to a previous change set and see if it works in VS still.
I suspect your project was corrupt for some reason.

Might be something that messed up your visual studio installation. If code is not a problem , then you can try system Restore.

Related

ENC1003 C# Changes made in project will not be applied while the application is running

I am getting this incredibly annoying warning for every C# file in my ASP.NET Core project when I debug it after hitting F5:
Because this error appears only during runtime (not during build), I can't even suppress it using the "Suppress warnings" box in the project properties. I've tried putting 1003 and ENC1003 in there and it still appears, cluttering up my warnings window. Does anyone know why this thing is appearing and how I can get rid of it?
UPDATE: It doesn't fix the fundamental problem which is that the warning is generated in the first place, but I've found a way to suppress it. Create a GlobalSuppressions.cs file at the project root, and add the line:
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(null, "ENC1003")]
Related Github issue: https://github.com/aspnet/AspNetCore/issues/13284
Try to get the Lastest Version of your Visual Studio and try again, If Persist, Install Visual Studio 2019 v16.4 Preview 2.
Also Check out the following content>> https://developercommunity.visualstudio.com/content/problem/601258/edits-were-made-to-the-code-which-cannot-be-applie.html. You can also track this same issue on ASP.NET Github: https://github.com/aspnet/AspNetCore/issues/13284. We already have a fix for it, which will be available on Visual Studio 16.4 Preview 2
I was facing the same problem in my Visual Studio 2019, and therefore I had to update VS to the latest version and I was good to go.
Hope helps someone :) :)
You can go to build options and select the option to build solution (build->build solution), this should solve the problem and you will able to continue your project in solution mode.
I had this problem also in Visual Studio 2022 (17.0.5) running API projects. Restarting Visual Studio helps.
In the past, while debugging UAP apps, if I edit the code while the app is running it will let me know that it needs to recompile the whole application. (Usually when adding some sort of static variable or removing a function etc... Tht in and of itself is not a bug.
The bug is that when I STOP debugging, the error remains until I restart the IDE.
I would argue that suppressing the warning is a horrible idea - It means that you have no way of knowing if the code changes you made during debug were implemented.
Instead, try restarting the IDE and doing a clean and build. I don't remember what I do to make the error go away anymore, as I have not experiences this bug in at least 8 months.

Error executing task XamlCTask- Xamarin

I am stucking with this error for several days:
/Upackages/Xamarin.Forms.2.3.3.175/build/portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20/Xamarin.Forms.targets:
Error: Error executing task XamlCTask:
Could not find file "/Users/XXXX/obj/Debug/XXXX.dll.mdb".
Firstly, I updated the xamarin.forms, but the error was appeared again to me. Then, I clean each project and build it again, but no change has happened.
So, I am wondering what can I do? It has just shown to me since some days ago, before I could compile my project easily.
I had the same issue but using Visual Studio for MAC.
Try doing the following:
Go to "Preferences"
Then look for .Net Runtimes.
I was using: Mono 5.*
I changed my default to Mono 4.* and I was able to build successfully.
NOTE: Make sure that all the packages for Xamarin.Forms are also the same version.

Asp.net >>Error >> could not copy the file "obj\Debug\[filename.dll]"because it was not found

the problem is when i run any any asp.net project , it give me this error
could not copy the file "obj\Debug[filename.dll]"because it was not
found.
i really don't know what to do, and i don't want to reinstall as you all know visual studio is painstakingly slow when it comes to install or uninstall it,
am using Visual studio 2015
btw, some thing also happens, when the file is being built a cmd window opens and close immediately and it happens automatically, i think this is what it cause the problem.
Edit :
i found the answer , simply i reset every thing to default , and when i create a new project i set it to the default directory , i don't know if its the real solution but it worked .
You should try setting the target .NET Framework to 4.6.1.
See Changing the Target .NET Framework Version or Profile for an Existing Project for instructions on how to do this.

Visual Studio throws errors when attaching to Unity

All of a sudden when I try to attach to Unity 5.2 with Visual Studio 2015 I get a bunch of errors as seen in screenshot below. This is the second this has happened this week. Last time I had to create a new project and bring everything over to resolve the issue. Unity plays fine, no errors...but visual studio throws errors when I try to attach. It worked earlier this evening.
Few things to consider when project shows error while being fully functional in Unity3D Editor itself:
Can you build your project in Visual Studio even if errors are shown? If so, there is possiblity that these are just leftovers from Unity3D building your project - should disappear on first successful build from VS
If you can't build your project, have you tried to remove your Library folder from project's root folder? In many cases it will fix the problem but will end up in forcing Unity3D to rebuild some of the files it had previously in Library folder.
Have you added any new libraries (dll's) to project? Any chance they might be installed/added in a wrong way? If so, try readding them to project (if it's a classic dll) or readd plugin that you have troubles with.
I would leave version incompability as it would end up with errors in Unity3D console. Same with errors with solution per se.
When I changed target framework to Unity 3.5 .net full Base Class Libraries the build errors went away.
I found the solution posted by Nathan Koop here: Type or namespace name does not exist

VS2012 Project Xaml reports cannot find namespace error, but project compiles fine

I have a really weird problem with my Solution in VS2012.
The thing is, its a solution made by another person, and I have to use it for my c# course. I know it runs fine, because there are 3 others in my team, who got no warnings or anything like it.
From my point of view, the program runs just fine, but when I build, and search through the xaml files the errors just keep stacking up, about missing items in namespaces and other stuff like that:
Error 1 Could not load file or assembly 'Microsoft.Practices.ServiceLocation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. C:\Users\jesperplantener\Documents\Visual Studio 2012\Projects\02350Demo.VS2012 (1)\02350Demo.VS2012\02350Demo\View\App.xaml 9 9 02350Demo
Error 2 The name "EventTrigger" does not exist in the namespace "clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity". C:\Users\jesperplantener\Documents\Visual Studio 2012\Projects\02350Demo.VS2012 (1)\02350Demo.VS2012\02350Demo\View\NodeUserControl.xaml 68 17 02350Demo
and so on, I got around 29 of those errors.
Now to the fun part:
I am running on a macbook air 2013. Windows virtually installed in Parallels. I expected this to be the flaw at first, so I reinstalled a Windows 7. That did not fix it. Then I upgraded my parallels installation from 8 to 9. Did not fix the problem. I just finished installing Windows 8 now, in parallels 9, and the problem is still there!!!
Please, can somebody help me before I do something stupid! :D
And btw, yes the project has been downloaded several times, and it Works on my teammates computers.
Windows interactivity if I recall can have an optional blend assembly. Version 1 of Visual Studio 2012 version of Blend only worked in Win 8 and would not do WPF applications. You may not have the WPF version.
One can determine if the application version of blend is installed by running Blend. If it is and it works blend will come up normally, if not it will tell you and provide a link to download the trial version WPF version of Blend. This may have changed in the updates...
So before you anything, install update 3 to visual studio and then try blend. Verify it runs and then if you did install the update try a rebuild.
----- Update ----
For Microsoft.Practices.Services Locator, install from codeplex (Common Service Locator library)
----Update From OP (Jesper) ---
Verify all packages match same versions of .Net. Use Nuget to install/uninstall packages til all are aligned.
Try download the assembly from
http://scsf2012.codeplex.com/Download/AttachmentDownload.ashx?ProjectName=scsf2012&WorkItemId=1&FileAttachmentId=630895 (the link can be found at http://scsf2012.codeplex.com/workitem/1 ).
PS: just copied error message to google.
I had a similar issue in Blend. The VS 2012 designer was fine, but received the same errors as you in Blend, preventing me to use Blend's designer.
To solve this, I removed the offending reference, and re added it; but I didn't use the "Add Project Reference...", instead I used the "Add Reference" and selected the DLL manually from the file-dialog box.

Categories

Resources