using XNA 4.0's TileStorage.OpenStream() you can access files located in the application's binary folder, which are deployed with your application.
You can add files to visual studio project and set them to "copy to output directory", and then these get deployed to the phone, and can be viewed on your PC by looking at your "bin\windows phone\debug" folder
however, if you copy files directly to the "bin\windows phone\debug" folder, these are not deployed to your phone (FYI they get deployed to your Xbox if you are doing xbox development)
How can I deploy additional files to the phone, without adding them to visual studio? Basically I wish to use a postbuild script to get content from a file share, and deploy this + an index file (generated in postbuild) to the phone.
is there any tool, or easy solution for this problem?
A xap file is just a zip file with a different extension. So you can use the post-build event to edit the xap before deployment, using any command-line-aware zip extractor.
For instance, with 7zip:
"C:\Program Files (x86)\7-Zip\7z.exe" a -tzip $(ProjectDir)$(OutDir)Test.xap C:\FileToInject.png
Related
I have a finished project with a bunch of different winform files. They are linked between eachother through a menu file. How do I go from having this project as a visual studio application file to an actual application, with customized icon and that can be opened by a user from another PC (which doesn't have Visual studio). I don't want to just zip them.
I didn't try anything and this might be a newbie question but what I expect is basically to have an actual app instead of a bunch of files.
When you compile the winforms project you get a bin folder and a Debug/Release folders inside.
A simple way to deliver the app is just copy the Debug folder that have the .exe and dll files to the dest PC.
The best way is to follow this guide:
https://learn.microsoft.com/en-us/visualstudio/deployment/quickstart-deploy-using-clickonce-folder?view=vs-2022
Or make an autoinstaller
How can we include a separate .NET application inside a VSIX package? Preferably in a subdirectory so that it doesn't interfere with DLLs of the Visual Studio extension itself (different versions). The application is available in the same solution, but for the same reason I van also not add a reference to it in the main project.
The intention is to run that application as a separate process, started by the extension. The extension will then connect to that application through WCF.
I'm pretty certain you just need to include the .EXE in your .VSIX. A .VSIX is just a .zip file, and you can include additional files into it by simply adding them to your project and setting the Include in VSIX property to true.
To confirm, try downloading something like the Azure Data Lake and Stream Analytics Tools VSIX to disk. (I mention this one because I noticed it installed a number of .EXE's under my C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions directory).
Once you have the .VSIX on disk, rename it as a .zip file and unzip, or view its contents with the windows explorer. Note that the extensions.vsixmanifest file contained in that .zip has no references or entries for any of the .exe files installed by that .VSIX. Which means, all you really need to do is include it in the .zip file.
Add a subfolder to your .VSIX project, copy the .exe there, add it to your project, set the Include In VISX property to true, and I suspect you'll be all set.
Sincerely,
I want to publish my Web application to a ZIP file. To date I have been doing this by publishing to the file system, then manually zipping the output.
Is there a way of creating the ZIP file directly from Visual Studio? I've tried publishing using the publish method "Web Deploy Package". This generates a ZIP file, but the ZIP file contains a folder hierarchy that looks something like:
Content\C_C\...\MySolutionFolder\MyWebApp\obj\Release\Package\PackageTmp\
that mimics the folder hierarchy on my development machine. I just want the actual web content, i.e. the content of the PackageTmp folder.
I don't understand why the ZIP file contains this folder hierarchy: it means that deployments created on two different development machines with different working folders for the same source-controlled Visual Studio solution will produce different packages.
I got some files necessary for the hosting environment, e.g: robots.txt as in the attached image.
But I don't want to store them in Visual Studio solution, because they are not a part of my project, it will be confusing to have these under the solution folder or source control.
So, I am thinking is there anyway to let Visual Studio automatically copy these files from my custom location (e.g: D:\HostingPrepareForST\ ) to the output folder when I hit "Publish" to publish the website?
I have an ASP.NET 4.0 MVC 3.0 website which I have built and published into a directory on my machine ready to FTP to my hosting site. I have two .doc files which exist in a folder under the Content folder. When they were in their own folder, the folder was not included when published. I then included them in the Images folder under Content. When I publish, all the files in the Images folder are included except the two .doc files.
Why are the .doc files being ignored?
I took a closer look at this and I'm pretty sure it has to do with the build action of the files. If you add files such as Word docs and Excel docs to a project, Visual Studio does not include them with the publish by default. However, it will include image files and other similar content by default. To get the files to be included with the publish, right click on the document in Visual Studio and select Properties. Set the Build Action to "Content", and you should be good to go.