I have a c# desktop application.
I need to let the application read a configuration file (editable by the final user) and use readed values to chenge application behavior.
I need that this file is editable when the app is published. What kind of file I need to use? Ore which kind of properties I need to put on this file?
Now I tryied with a xlsx file included in project. In debug It works fine, but When I publish the application, the xlsx became a xlsx.deploy file and I can't edit anymore.
Thanks in advance
Just have a try.
project -> right click -> properties -> publishing -> options->Deployment。
Related
I created a new Blank Node.js Web Application in Visual Studio 2015, and I'm unable to add .tsx files to my project and compile them. When I do so, the created .tsx file is put into a Virtual Project instead, even though it is present in the actual project as well. The project is set to compile JSX expressions as React calls.
It took me some time to track down what's happening behind the scenes, and what happens is that when a .tsx file is created in the project (through Add -> New File), it is created as a Content entry in the project's XML file, instead of a TypeScriptCompile entry. This is clearly an error.
I can fix the issue by manually editing the project's XML file, but no way I'm willing to do that for actual production in 2016, with hundreds of files.
Step-by-step guide to reproduce the error
Create a new Blank Node.js Web Application project
Create a new .ts file in the new project
Create a new .tsx file in the new project
See that the displayed "host project" of the .tsx file (check the top-left corner of the editor window) says "TypeScript/JavaScript Virtual Projects".
How can I make it so that .tsx files are included in the project exactly how .ts files are?
Edit
This is not a problem with a HTML Application with TypeScript project, but that project type contains a lot of unnecessary C# bloat that I don't need.
I can fix the issue by manually editing the project's XML file, but no way I'm willing to do that for actual production in 2016, with hundreds of files.
This has to do something with the project template, and is likely a bug. A possible workaround in the meantime is creating the new file as a .ts file, and then renaming it to .tsx.
I'm writing an addin for Monodevelop and Xamarin Studio, and it's working, but I have had to hard encode some settings.
What objects do I query to get:
Templates available in the IDE.
Path to currently selected output (../bin/Debug).
Output executable filename.
Path to currently selected output (../bin/Debug).
If you mean the active project configuration (if one is active...), you can get the currently selected configuration id in the IDE via:
IBuildTarget buildTarget = MonoDevelop.Ide.IdeApp.ProjectOperations.CurrentSelectedBuildTarget;
Assuming that your buildTarget is a DotNetProject, you can get list of the project's configurations that are available via:
((DotNetProject)buildTarget).Configurations
DotNetProject Configurations have an OutputDirectory property that return a FilePath object.
Output executable filename.
Once you have the configuration that you need:
DotNetProjectConfiguration.CompiledOutputName
Templates available in the IDE.
Templates are provided via the "/MonoDevelop/Ide/ProjectTemplates" Addin extension and there are solution, project, file templates, etc.. If you really need to enumerate all of them, look in
[src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/][1]
I have a console application that I've been developing and I'm just about ready to publish it for consumption.
However, there's a file that the app needs to reference (a couple files actually) and I'd like to try to include these either during install logic or via an outside process. Here's the situation:
The application fires off a load test based on some criteria the user chooses. The load test is defined by a .loadtest file which is created outside of this project.
So what I would like for the installer to do is contain the .loadtest files and just shove them in a default directory that the project can reference.
I can't figure out how to add this specific file as a pre-requisite or anything though, in the publish wizard. Any ideas?
When you add a file to the solution, it does not automatically get attached as part of the build in some cases. If you right click the file in your solution explorer and select "Properties", change the build action to "Content". This will ensure that VS includes the file as part of the build/publish and places it in the output directory of the build process.
My project has Help folder which is located within web project AND in which we kept some template excel files.
When we do "Web Publishing", these files does not get copied on the server. If we change the extension to xml from xslx then they get copied.
Can you please suggest something to change the publishing scheme/method?
Have a nice weekend!!!
Set the "Copy to Output Directory" flag in the File Properties
Select the file in Solution Explorer, and in the properties window change Build Action to Content.
For more background information on how files are selected for publishing, see
http://msdn.microsoft.com/en-us/library/ee942158.aspx#why_dont_all_files_get_deployed
I'm trying to add a licence.rtf file to my setup project, I've followed this stackoverflow answer step by step in order to add the licence file.
What seems to be happening is when I add the license file it doesn't add it as an embeded resource so when I remove the file from my local machine i get a complie time error...I also do not see any property which let's me change the license file to an embeded resource.
This is the error that I'm getting
Please let me know if anyone has experienced this issue before and how can I go about fixing it
UPDATE:
When you add the licence.rtf file to the Setup Project it does not have a BuildAction property which can be set to EmbededResource.Tried that
I seem to have figured it out. Instead of trying to add the License.rtf file to the setup project I've added it to another project in the solution.
Once done I reference that file in my setup project and when the setup file get's compiled the license file is embeded in the exe.
Click the file in solution explorer, view properties. Then change Build Action to Embedded Resource.
The usual way to show a license agreement in a Visual Studio setup project is as follows:
Go to the User Interface view in the IDE. Right-click "Start" and then Add Dialog, add the License Agreement dialog.
Right click the dialog to move it up or down. Right-click and Properties Windows shows properties where under License you can browse for your custom license RTF file.