UWP app build failure "Microsoft.UI.Xaml.Markup could not be found" - c#

I've downloaded a UWP solution that consists of 8 projects. Upon building in VS 2017 I get the following error each of the projects in the solution:
"The referenced component 'Microsoft.UI.Xaml.Markup' could not be found."
Sure enough, when I look under the "References" node for each project in the Solution Explorer window "Microsoft.UI.Xaml.Markup" is listed but with an exclamation mark next to it. If I click on it and look at its properties in the properties window there is nothing listed in the "Path" field (and Copy Local is set to false, if that's of interest to anyone).
I've tried right clicking on it and selecting "Remove". I then use another UWP app that builds just fine (that's also referencing "Microsoft.UI.Xaml.Markup") to locate the path of "Microsoft.UI.Xaml.Markup". In the project that's giving the error I right-click "References" and select "Add References...". I browse to the location of "Microsoft.UI.Xaml.Markup" and add it to the project. It shows up in the "References" node but again displays an exclamation mark and nothing in the Path field. I can't seem to add it to any of the projects in the downloaded solution. What am I doing wrong?

For what it is worth I had this issue and changed the target UWP version in the project properties dialog and this resolved the issue. So it does seem to be related to the Windows 10 version you are targeting vs the Windows 10 SDKs you have installed.

Related

Warning : The referenced component 'NuGet.Core' could not be found

I am working on a developed desktop application in Visual Studio 2010. Till yesterday everything was fine but from today as soon as I open the project in Visual Studio it is giving me warning,"The referenced component 'NuGet.Core' could not be found". I searched in Solution Explorer and found that in the Project-> References, NuGet.Core with an exclamation mark. Is something got deleted or corrupted I don't know. Please Help!! I am not able to find the reason behind this. Searched for the solution but no success.Image:This is what I got while searching in Solution Explorer
The exclamation mark means that the project has lost the location of the reference, but it knows it should be there. If you manually delete the reference (right click on the component and then select delete) and then re add it (project -> add reference -> then find the file location [you should not need to re add it using Nuget]) to you project it should get your project working again.
With regard to why this is happening, something may have changed somewhere that caused VS to lose the reference. This could be the location of the reference, or source control, or something else. Often I am unable to find the reason for this.

How To Fix Icon For InstallShield

I used to be able to create a setup project in Visual Studio, but now Microsoft has "improved" it and I'm wasting hours trying to get a simple project to someone else in my company. They need to upgrade their version of .NET or I wouldn't even use a setup. So after going through the pain of downloading their "improved" InstallShield and going through the pain of watching a video and setting all the parameters I tried to build the Setup project and it says the icon isn't valid. "Screw the icon. Let me deploy my project." The actual error message is "Cannot extract icon with index 0 from file ..." It doesn't matter to me if this uses a standard icon or no icon, I just want the user to be able to test this project.
So, what is the easiest way to get this setup project in the hands of my user?
I solved this problem by adding a new icon to the project and re-compiling. You can do this by right-clicking on the project and selecting Add -> New Item -> Icon File. Then assign that icon file under the Project -> Properties menu item.
Simple Solution:
At the time of Installation Wizard, while missing the reselection of
the Image / Icon for shortcut after we have browsed the resource path.
Missing this causes this index error (please refer screenshot). after
re-selection rebuild is required this solves problem.
Simple way to fix this error :
Right click on your project- go to properties-application tab-in application tab set icon to your project in Icon & Manifest option

Make copy a vs application project

I created a web application project and it's working fine. Now I copy this project and create the new project with the same source. This is also working fine. Now I'll try to publish the second project now I get the error:
Copying file obj\Debug\Package\PackageTmp\Site.Master to obj\Debug\Package\PackageTmp\obj\Debug\Package\PackageTmp\Site.Master failed. Could not find file 'obj\Debug\Package\PackageTmp\Site.Master'
I tried many way, but not resolved my problem. Please help me to solve this.
It looks like VS is telling you it can't find the file Site.Master. Check that it (and any others) is included in the project by:
Click the "Show all files" icon in the Solution Explorer. This will show if any files are not included in the project;
The right click on the files/folders that are greyed out (not included)
Select "Include in project".

InstallShield: cannot extract icon with index 0 (for dummies)

Yes I did my homework first. And I'm still stuck. First let me express my irritation at Microsoft for deprecating the Installer project type. Shame on them.
Back to my issue, Here is the error:
Error 3 -3204: Cannot extract icon with index 0 from file <some_path>\obj\Debug\MyProject.Gui.exe.
Attempt #1: InstallShield: cannot extract icon with index 0 vb.net
-- The answer says to include an object of type icon in my exe and rebuild. To do this, I tried the following:
right clicked on my windows forms project, add new item, icon, save all
open the icon file in step 1, draw some text in it, save all
right click the project and select rebuild (no errors, looks good)
left click on 'Specify Application Data'->'Files', select the *.ico in the project (Note: I can see it clearly listed, and it appears in the dialog as index0)
left click on 'General Information'-> 'Display Icon' -> browse for the *.ico (located in project folder for MyProject.Gui.exe)
save all and rebuild all
...I still get the same error message.
How does one "Recompile your EXE to include an icon and the message will go away"?
I had the same issue. Your problem is because you need to embed the icon into your executable. The way you do this is in Project Properties window in Visual Studio (Alt-Enter or right click ->properties for project root in solution explorer).
In the project properties under Application, there's a group box called Resources. Add your icon as shown below and install shield will build fine.
Hope that helps.
I was getting this problem, I try a lot of solutions on the web, but the only way that works for me:
Expand the deploy solution (+) on the right panel (Solution Explorer)
Expand the menu "Configure the target system"
Double click on Shortcuts folder
Here you will find 2 output you set up in the project wizard.
Select one of them, and find the property Icon, click to (...) to browse the propertly icon.
Do the same with the second one output built solution.
Rebuild your project!
Regards,
You need to copy the icon file to the debug folder of your windows application to successfully compile.
Go to Shortcuts/Folders under configure the Target System.
Select your application from the tree.
Select the icon and change the index to 2 (or something other than 0)
Build it.
If the problem is that you associated the icon with the installer and you embedded it into your application but you are still getting this error, try adding a folder exception to your antivirus software. The exception should be the folder where your source is located and the executable is output.
The symptom is that you randomly get this error during a build. It is caused by your antivirus software preventing the installshield icon extractor from accessing your application executable.
This happened with me also. My application runs in the background so I didn't create an Icon for it. When this error occurred I assigned an icon and everything built okay.

Winform project migration question

I have got a few projects and when I run them on another computer, it fires an error that says: the debugging doesnt belong to...
and it opens a browser dialog box as if it wants me to point to the missing file..
How can i overcome that problem?
"Entering break mode failed for the following reason: Source file:"D:Document and Settings..."(path to the old directory the files were).. doesnt belong to to the project being debugged.."
Try look here:
"Entering break mode failed for the following reason: Source File XXX does not belong to the project being debugged
from the above post:
I found 2 things that may have helped:
1) I had previously moved the folder location of a dependent project,
then removed and re-added the project to my solution. However, the
"References" of the depending project still showed the path to the old
location. These properties are unfortunately read-only within the
GUI, so I just removed and re-added the project reference.
2) I noticed that my Visual C# 2005 Express doesn't have a "Build",
"Clean Solution" menu option. Instead, I closed Visual C#, deleted
the "bin" and "obj" directories under each project, restarted Visual
C#, and things are working as expected again.

Categories

Resources