I have a very strange behavior, when I build my project on my laptop. I get this error:
The "ValidateSilverlightFrameworkPaths" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with in the project file, or in the *.tasks files located in the "C:\Windows\Microsoft.NET\Framework\v4.0.30319" directory.
I have no idea whats this all about - i have never setup any task in a project file. I don't know anything about a Task nor declared something in the framework dir. I can build on my other machine. The project is shared via TFS.
Google doesn't give me enough results to work with.
I already deleted everythin on my laptop and pulled it from the TFS again.
Have you some tips, how to solve this error?
Greetings
It seems as if you do not have silverlight installed on your laptop and you try to build a silverlight project.
As the name suggests, the ValidateSilverlightFrameworkPaths taks is part of the build process for Silverlight projects. The mentioned target file is located at
C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v5.0\Microsoft.Silverlight.Common.targets
the assembly containing the task class is named Microsoft.Silverlight.Build.Tasks.dll and resides in the same directory.
Related
Have a WPF .NET Core 3.1 app, and it was working on a computer for a while, then it would stop opening. Looking at the event viewer saw this error:
Description: A .NET Core application failed.
Application: MyApp.exe
Path: C:\Folder\MayApp.exe
Message: The application to execute does not exist: 'C:\Users\user\AppData\Local\Temp.net\MyApp\002t0akn.2dd\MyApp.dll'.
If you delete the folder and start the app again it works. Any idea why?
The app is published, .netcoreapp3.1, self-contained, win-86, produce a single file and ready to run
The NET Core "single file" mechanism is a lot like the self-extracting ZIP executables of old; it makes it easier to distribute, but it still needs to dump all of the dependent files out somewhere before it can run, and it looks like the specific temp folder may be giving you issues.
The process is described in Microsoft's documentation:
Extraction Location
For a single-file app, the extraction directory is <base>/<app>/<bundle-id>
<base> is
DOTNET_BUNDLE_EXTRACT_BASE_DIR environment variable, if set.
If not, defaults to:
Windows: %TEMP%\.net
<app> is the name of the single-exe binary
<bundle-id> is a unique Bundle-identifier.
You might try either disabling the single-file packaging or adjusting the environment variable to use a less transient folder for extraction.
Using Visual Studio 2017 on Windows 10, I have a WPF application with an installer created using the Visual Studio Installer extension. When I install it on another PC, the application starts but then exits within the same second. Nothing in logs.
If I add a manifest to force admin mode, its starts correct.
If I copy the files to another folder (outside program files) it starts correct.
Apparently the "program files" is restricted or something? Am I missing something in my setup/installer project? Any other ideas more than welcome!
EDIT:
I've tried to create the installer using WIX and then it runs fine. Seems to be some settings in the VS Installer extension.
You can modify the ACLs on the folder in question to allow write access by regular users (not great) or you could write the settings file somewhere else where write permission for users is standard.
There are many ways: Resolve lacking permissions.
There is another, similar answer here.
Adding a couple further links:
WiX and deployment links, various topics.
Let's say that I have created a form or a console application. This form application's only dependency is .NET Framework (not a 3rd library) and application doesn't have any kind of requirements. What it does is to take a file and transforms to something else.
Does this application need to be installed? Can I just copy .exe file that is under \bin folder and share it?
First, you need to make sure that Copy Local is set to true for all the references of your start up project. Setting copy local to true will make sure that the DLLs get copied to the output directory. Then, build the solution and copy all the files from your output directory to any machine where you want to run the application. The application should work, as long as it has the appropriate .NET framework installed.
Here's a link about how to set copy local to true: http://msdn.microsoft.com/en-us/library/t1zz5y8c%28v=vs.100%29.aspx
There are 2 Ways to Do This... I just did this 20 Min Ago :)
Method 1 : Right Click on Your Project, Publish, Choose Location For
The installer. This installer can be copied onto other machines, installed and run
Method 2 : Your bin/release folder will contain .exe files which need to be copied and Installed, i prefer the 1st method. It avoids missing important / Needed Files for execution
Just a Side Note. Make Sure the Output Type Is of Console Type (Right Click on project... Output type...), Some windows applications give Problems when Publishing and Installing them due to the frameworks that might be missing
I've packaged my WinForms app with the Visual Studio Installshield Limited Edition wizard.
When installing the app, I get this error during installation.
Error 2715. The specified File key ('myappname.xml_serializa') not found in the File table
Any ideas from anyone? I'm completely loss on this one.
In your installer project directory, open the *.isl file and search for the text in your error message, myappname.xml_serializa. It will most likely be in there quite a few times. Either remove it or correct all instances of it.
I had a similar problem recently and found out that it didn't find the key because I was not adding the .primaryoutput file on the section Specify Application Data -> Files. Check if you are adding all the necessary files for your setup before creating the installer. The installer will be created even if it doesn't have all the files, but it won't execute properly.
Hope this helps
Changing the *.isl file resolved our issue. I found that we had changed the .NET framework of a project and when we removed the project output from the Installshield using the prompt it did not update this file so when we added the output again it now contained two outputs. OUTPUT and OUTPUT1. Hope this helps
This is what worked for me: The project in my case was readonly as it was connected to TFS. If you are working offline, make sure you make the project files writable. (Uncheck Read Only at the folder level)
This worked for me:
In your setup project double-click Project Assistant.
Click on Application Files.
Select file(s) with the file extension that was reported in the error message(s).
Click on Delete.
Repeat for any files as needed.
Go back to setup project in Solution Explorer.
Click on Rebuild
I had to rebuild a project in my application.
I created a new project, created each file, and copied the contents of each file into the new project one at a time making all the necessary changes.
Now when I try to compile the project, it gives me three errors:
The metafile c:\projects\project1\CustomerModule\bin\Debug\CustomerModule.dll could not be found.
Application Definition Element could not be given by the library project file.
The project file has invalid properties.
Clicking any of these does nothing.
What are these errors telling me? What do I need to change to get my application running again?
New info: If I do a "rebuild" on just the project, I only get the second two errors, so these seem to be the original issue, but what is the library project file and what properties are invalid?
I found the answer on this forum question.
Basically the thing I did wrong was copy images from a directory in one module to a directory in another module within the Solution Explorer. Don't do this. Instead, copy them from the Windows Explorer into the Solution Explorer, then everything works fine.
Click add a reference and browse for the dll file you want to use.
You may have to rebuild the dll for it to work.