clickonce file missing - file

Using Clickonce with VS 2010 and .NET framework Client profile 3.5, I have several file folders with application level XML and/or textfiles that are needed at runtime.
The file folders sits in the same project where they are to be used.
These files are marked as "Copy always" at compile.
Build Action is "Content".
On my development machine the files are actually copied into the ./Bin/Release/myFileFolder/xxxxx and all is fine.
On user's computer, install runs fine but some files are reported missing at runtime when the program need them.
Do I miss something? Is any file specific option deep hidden in the option list?
Help please! and .NET framework 3.5

If the files are in referenced projects then they are not included in the click once publish by Visual Studio. You can verify this by checking the application files dialog in the publish page of the project properties.
Assuming this is the case to get these files included you can either add them as links in the main project itself or edit the project file to include extra files in the manifest. See ClickOnce Content Files for information on how to do this.

I can confirm that this can still be an issue in Visual Studio 2019.
I have been working on DevExpress dashboards that consume XML files at runtime to produce their dashboard layouts, and whenever I would publish my project, I would get a bizarre error about the XML file not being found when clearly it was published to the same output directory as the rest of the project.
Just to be clear, the XML file existed in my Visual Studio project and was set to Build Action = Content and Copy Always To Output Directory.
What I had to do was what was suggested in this answer:
Go to Project Settings.
Open the Application Files list.
Change the Publish Status of the XML file - which Visual Studio automatically set to Data File (Auto) - to Include.
Voila. FileNotFound error magically disappeared after publishing the project.

A workaround is to make your application create the xml/txt files if they dont exist.

Related

I am getting "myApp stopped working" after installig my WPF(+telerik) application

I created a WPF application using telerik control suite (WPF telerik controls and ORM access control) and SQL Express R2 2008 in VS 2012.
Then I created its setup files (using install shield LE and also Advanced Installer) which works on my win7 system, properly () .but when I install the setup file on any other win7 system, it doesn’t work( I am getting this error: “MyAPP has stopped working”).
I installed .NET framework and SQL Express R2 2008(the service’s status is running) and I also copied the mdf and ldf files related to the database in right path that specified in app.xaml.
When I install my setup files, it just copy my project’s debug folder (contains the telerik control dll files, the dll file related to my ORM access control project, built exe file and etc.). I think that’s enough. Isn’t it?
Edit:
The project's Solution's Explorer:
\bin\Debug
I have no idea what to do.
I would really really appreciate any hint or comment.
Regards,
Hiva
I know this is a very general answer although without knowing the details of your project it's the best I can do. I remember when I was creating an app using telerik controls, when I went to publish it I was getting errors in the with the assembly which was a result of including the obj / Debug / Release folders in my project. I tried everything that people listed to get rid of the errors but the only thing that helped was creating a new project, copying in the code and NEVER including(Never right clicking and hitting include in project) those folders in my project.
Is it working when you debug it?
Could you please let me know what steps you are taking to publish the app ?

Special Folder "Common Application Data Folder" not available in my setup project. Why?

I want to create a Visual Studio 2010 setup project that deploys some files to a folder where my application can use it from. I want it so, that all users have the same files, and that they also could manipulate them without admin rights.
Thus, "Common Application Data Folder"* as described in this MSDN article, seems fine.
However, in my Visual Studio 2010 setup project I did not find the "Common Application Data Folder" available in the "Add special Folder..." drop down menu.
I have a .NET 4.0 WinForms app and see no reason why this does not show up.
The user's common application data folder is available but does not match my intended use.
Thanks for any hints!
Visual Studio setup projects do not have a predefined folder for common Application Data. However, you can install files in it like this:
add a custom folder and select it
in its Properties pane set DefaultLocation to:
[CommonAppDataFolder]
in this folder add the files you want installed in common Application Data
During install CommonAppDataFolder will be automatically resolved by Windows Installer.
A more specific solution might be to set the DefaultLocation property to:
[CommonAppDataFolder][Manufacturer]\[ProductName]
Manufacturer and ProductName will be resolved from the values you assign to the corresponding properties of the setup project.

Visual Studio Project Linker: is it possible to populate destination project automatically?

I have a Silverlight project with lots of source files. Now I want to create a new WP7 project using the same source code files (but obviously, target WP7).
I link the WP7 project to the existing Silverlight project using Project Linker. However, this does not automatically generate links to the existing files in the source project.
Is there any way using Project Linker to automatically populate the destination project with the already existing files in the source project? Or do I manually have to add links in the WP7 project to all previously existing files in the source project?
I have the same problem, but I resolved it.
Simply exclude all files from "source" project and then re-include them.
In this way project linker refresh its references adding all links!
It worked for me!
I'm not quite sure what you but I think you'll have to do manually in VS.Net, but if all the files in the same directory you can add all the files in one go, it sounds as though you want to select the 'Add as Link' option once the add 'Existing items' dialog is displayed.

Changing the config file in a Visual Studio Package

I'm building a Visual Studio Package and associated with it, I have an app.config file (which contains some information about connecting to a WCF service).
As far as I can tell, this package is actually connecting to the devnev.exe.config configuration file (if I use AppDomain.CurrentDomain.SetupInformation.ConfigurationFile), it will retrieve the path to the devnev.exe.config
Firstly, is this correct? Shouldn't the package automatically pick up the app.config file? If this is the case, then how can I make the project use the app.config file?
I'm running VS2010 Ultimate, programming in C#.
A Visual Studio Package will take the devnev.exe.config configuration file as its main configuration file. If you add an app.config file into the project, it will not accept it. This is because the package is running within Visual Studio, therefore it is accepting Visual Studio's config file.
At the same time it is not good practice to change the devnev.exe.config file, since once you deploy your application, the user will also have to change that file (and on the whole, you shouldn't change that file).
What I ended up doing is connecting to the WCF service programmatically.
Hope this helps somebody.
When you compile your project the app.config is compiled as [exe].config.
If you want to change configuration you can change the content of [exe].config (it's a plain text document).

Setting up a new EPiServer 6 project with source control

I want to end up with a single VS project/solution that I can check in to source control, that any other developer in the office can simply check out and run, and that I can deploy without having to install EPiServer program files on every web server.
I have just used the EPiServer 6 Deployment center (part of the official EPiServer 6 download). That gave me an EPiServer templates project, website setup in IIS, and a database installed.
The first issue is that when I change the VS project file to use the Visual Studio Development Server, the cms start page (site centre) no longer works.
And an even bigger problem is that the episerver.config file is using all sorts of files in the C:\Program Files (x86)\EPiServer directory on my machine.
You can remove the virtualPath items pointing to Program Files in the config file and copy those folders to the same paths inside the source controlled project folder.

Resources