How to log a project that is being deployed from Visual Studio? - c#

I have a C# project written using Visual Studio Express 2013 for Windows Desktop. When I run the project in debug mode via Visual Studio (on Windows 8 Pro) it executes just fine, and so does copying the files out of the bin directory.
I need to deploy to a Windows 7 Embedded System with the correct version of .NET Framework. I tried:
copying the files over with the .dll and everythig from the bin folder and when starting I get no error, but doesn't start at all. I get no information at all.
tried the one click installer (choosing the option to install from dvd) and it seemed to install fine, but when I start it, I get same issue. Not starting, and no messages.
I also tried the Advanced Installer (free version) and when importing the visual studio project files it fails with the message "Failed to start Visual Studio. Error: Invalid Class String"
[UPDATE] Advanced Installer cannot import VS Express solutions because the API from VS that provides assistance on import is not available for VS Express edition. Only solutions created with paid editions of VS can be imported in Advanced Installer.
So how can I log or see what is happening to debug this?

Related

Error when building universal app for the store: "Manifest references file 'MyAppName.dll' which is not part of the payload."

I am having this error in Visual Studio 2015 when try to create app package for the store for a windows universal applicaiton:
Manifest references file 'MyAppName.dll' which is not part of the payload.
The error is in the ...\..MyAppSourcePath..\Package.appxmanifest file.
This is somehow related Manifest references file 'Bing.Maps.dll' which is not part of the payload but in my case the error shows up only when build package for the store and is related to the MyAppName.dll (where MyAppName is the name of the name of my application).
Another related question in MSDN: https://social.msdn.microsoft.com/Forums/en-US/f137091e-f550-4eab-b7e2-418149b97d40/error-appx0703-manifest-references-file-myappnamedll-which-is-not-part-of-the-payload?forum=windowsstore
It turns out this is known issue in Windows 10 SDK (Update 1.1). Reference: https://social.msdn.microsoft.com/Forums/en-US/73f2d56d-9e8e-4b57-bcfa-0a972dfd75d7/update-11-generating-store-associated-package-fails-for-a-uwp-application-with-a-winrt-component?forum=Win10SDKToolsIssues
To workaround this issue, add the below ItemGroup in your project file and regenerate the package.
<ItemGroup>
<AppxSystemBinary Include="<Assembly Mentioned in the error>" />
</ItemGroup>
For example, if the assembly name is MyAppName.dll, include:
<ItemGroup>
<AppxSystemBinary Include="MyAppName.dll" />
</ItemGroup>
This ItemGroup can be expanded if the error still occurs for other assemblies, for example:
<ItemGroup>
<AppxSystemBinary Include="MyAppName.dll" />
<AppxSystemBinary Include="OtherAssembly.dll" />
</ItemGroup>
A bug fix for the Visual Studio Tools for Universal Windows Apps (v1.1.1) is released on 5 October 2015. This update requires that you already have the UWP tools v1.1 installed. You can determine whether you have UWP tools 1.1 installed by opening About Microsoft Visual Studio from the Help menu in Visual Studio. If you have “Visual Studio Tools for Universal Windows Apps 14.0.23309.00” installed, then you have the UWP tools 1.1.
To install this update
You must have an internet connection throughout the setup process.
For machines without Visual Studio
Install Visual Studio from https://dev.windows.com/downloads.
For machines with UWP Tools 1.1 installed
Run this installer (http://go.microsoft.com/fwlink/?LinkId=627168) to update the UWP tools to v1.1.1.
For machines without UWP Tools 1.1 installed
For Visual Studio 2015 Community, Professional, and Enterprise, you can install by
Modifying your setup to install the updated tools.
Clicking on the entry for the UWP tools in the Notifications pane.
Using the Extensions and Updates dialog to update Visual Studio.
Running the installer at https://dev.windows.com/downloads, which will add the updated tools to an existing Visual Studio installation.
For Visual Studio 2015 Express for Windows
Run this installer (http://go.microsoft.com/fwlink/?LinkId=624822) to update the UWP tools to v1.1.
To confirm that you have installed the UWP tools 1.1.1 update,
Go to Programs and Features in the Windows Control Panel, and click View installed updates.
Look for “Update for Microsoft Visual Studio 2015 (KB3073097)”, version 14.0.23315
Source: https://social.msdn.microsoft.com/Forums/en-US/73f2d56d-9e8e-4b57-bcfa-0a972dfd75d7/update-11-generating-store-associated-package-fails-for-a-uwp-application-with-a-winrt-component?forum=Win10SDKToolsIssues
I had a hell of a time trying to work this out and it's a slightly different issue to what the OP posted but hopefully this will help someone else out because I couldn't find the answer on StackOverflow and finally found it here: https://social.msdn.microsoft.com/Forums/Sharepoint/en-US/65bc5999-662c-4eda-9967-e1b3031db8c4/error-appx0703-error-manifest-references-file-assetssplashscreenpng-which-is-not-part-of-the?forum=wpdevelop after many hours of mucking around and trying different things.
My error was the same except the file was for the various store and tile image files thus: "Manifest references file 'Assets\Store\StoreLogo.png' which is not part of the payload."
All the files did exist but turned out I was running Visual Studio on a VM using Parallels and the project opened through shared folders and using a UNC path. Ran the project from a mapped drive and it builds all good.
I do realise now that referencing UNC paths using a VM in Parallels Desktop has caused a few issues for me in the past. So just need to keep in mind that things should be run via a mapped drive instead to avoid this.

Error in Visual Studio 2015 When Add New WebForm

When I add new WebForm to my project, I get the following error:
Could not load file or assembly
'Microsoft.VisualStudio.JSLS,Version=14.0.0.0 , Culture=neutral ,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.the system
can not find the file specified.
I tried to create new website project and I tried to reinstall VS 2015 but this did not help.
This is a known bug with Visual Studio 2015. The officially-endorsed solution from Microsoft has been posted on MSDN:
If the “Tools for Universal Windows Apps Development” are still installed:
Go to Programs and Features, select Visual Studio 2105, click Change.
In Visual Studio setup, click Modify.
Deselect the feature “Tools for Universal Windows App Development”
Select “Tools for Universal Windows App Development” again, and click Update.
If you have already uninstalled the “Tools for Universal Windows Apps Development”:
Reinstall “Tools for Universal Windows App Development”
Or take the following steps to reinstall the JavaScript project system and language service:
a. Download the installer for your edition of Visual Studio, e.g.,
vs_community.exe.
b. Open a CMD window, and run the following command:
vs_community.exe /modify /installselectableitems JavaScript_Hidden
/passive
A temporary solution:
Shut down Visual Studio and reinstall the following package from the DVD or ISO:
x:\packages\JavaScript_LanguageService\JavaScript_LanguageService.msi
A better solution, endorsed by Microsoft, has been posted.
Remove the update received for visual studio TypeScript on 11/08/2015. it seems to be buggy. After removing TypeScript update, my VS is working fine ;-)
and if you try to reinstall x:\packages\JavaScript_LanguageService\JavaScript_LanguageService.msi from the installation package, soon or later you will face one more problem that "Something went wrong.. may be because of a extension.."
Easiest way is to remove TypeScript update for now. TypeScript future update may fix the problem.
OR
Run command prompt as administrator.
CD C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
devenv /updateconfiguration
devenv /clearcache

Change Published Project Install Directory in Windows8.1

I am trying to change the default installation directory of my projects when I publish them but I seem to have no choice over where the published setup.exe actually puts the program. It seems after setup.exe running and application installed, all the processed files are under the folder of C:\Users\{username}\AppData\Local\Apps\2.0\ (Something like that, I dont remember the exact directory as it is very long). This is not what i want as I installed the program in the C:\Program Files\ but all the log files go to the C:\Users\{username}\AppData\Local\Apps\2.0\. This is really really annoying.
The application I published is C# Windows Form Application
And I have looked through online and found that somebody suggested to create an MSI package for C# Windows Application Using a Visual Studio Setup Project instead of publishing the program:
Publish Windows form application how change the installation path
It is supposed that the above website can solve this problem. Are there any other suggestions to solve this redirection problem after publishing the C# Windows Form Application? Thank you.
When you use the Publish funtion in Visual Studio, you are creating click-once publication. This type of deployment has relatively fixed rules and not everything can be configured. It allways installs into an obfuscated folder under windows user profile. It is similar to the fact, that you cannot change location where windows-store modern apps are installed under Windows 8.1.
You can create MSI setup project for your app - but in Visual Studio 2012 this type of project is missing and it was re-introduced againg in Visuals Studio 2013. There you can specify install folder. You can also use Install Shield Lite with Visual Studio 2012.
You wrote:
This is not what i want as I installed the program in the C:\Program
Files\
It is not possible to install ClickOnce application using Publish button in Visual Studio into C:\Program Files\.
If you have just problem with the location of your log files, you need to specify a different folder within your application code. Make sure that user, who is running your app, has write access to that folder - it should be in some user's profile folder or in a public folder. Avoid %ProgramFiles% as a folder for your log files - it is not a good practice.
Instead of Application.StartupPath you should use path accessible to all users including non-admin, like:
Path.Combine(Environment.GetFolderPath(SpecialFolder.CommonApplicationData),"MyCompanyName")
You can use InstallShield to create installation wizards/Setup.
Here's the free version for Visual Studio

vs 2010 installation after vs 2012 , cant see vs 2010 run option

i want to use vs 2010 and 2012 side by side on my single windows instance. I had vs 2012 installed and created a project in it, now I install vs 2010 and tried to run it but their is no run option for it, there are many options like configure, info etc but no run option ,it showed that vs 2010 was successfully installed, there were no errors at that time while installing ,,,, please help
Go to this file directory and run this EXE and VS2010 should start for you if you had no install errors. I have both running just fine on my single windows instance.
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe

When creating a WCF project in VS2010, I get "Error : WcfProject.csproj cannot be opened. The project type is not supported by this installation"

hey there. So, we have a VS2010 project and the VisualSVN server on one machine. We added a new machine with the client visual svn and the projected loaded in. except for the WCF service. i'm getting a...
" error : the project file c:/..../wcfProject.csproj cannot be opened.
The project type is not supported by this installation."
i've checked the directory, the files and file structure are there and the same as the main development machine. any tips/solutions?
thanks
David K.
I had a similar problem with some WCF solution which I downloaded from a blog.
The solutions of running deveng with the switches did not resolve my issues. After some more searching it turned out that the following clue in the answer of Ralph Willgoss lead to the solution of my problem:
I resolved it by installing the Visual Web Developer.
I also had to (manually) install the Web Platform Installer to (automatically) download the last requirements for the project to properly load.
I had a similar problem when trying to create a new project of the following types:
WCF Service Application
WCF Work Flow Service Application
Syndication Service Library
I was using Windows 7 Ultimate 64bit, with no other versions of Visual Studio installed.
I also had tried many other options, such as:
devenv /resetsettings
devenv /resetskippkgs
ensuring I had C++ option of VS2010 installed
VS2010 Service Pack 1
I resolved it by installing the Visual Web Developer.
There are a few things this could be so I can't give you one specific answer. However, here are a few things to try on your machine that is throwing the error:
First, verify which version of Visual Studio is set as the default for opening csproj files. It could be that you installed SQL or something else that uses an older version of Visual Studio. Sometimes that can give an error. Even if the default is the Visual Studio version selector I've seen it throw an error. Open up the correct version of Visual Studio (through the Programs menu) and then inside Visual Studio try to open the package. If that works, you know the issue is with which version is opening the file.
If that doesn't work, you could try resetting the Visual Studio settings. From the run menu type devenv /setup This should reset the Visual Studio environment and hopefully it will fix the issue. If this does not work, try running devenv /ResetSkipPkgs from the Run menu. This will try to load any packages that Visual Studio previously skipped.
If these steps don't work, let us know. Give us any further error messages that come up after attempting these steps.

Categories

Resources