HowTo deploy all files of .NET Compact Framework Application (incl. Subfolders)? - deployment

I have a .NET Compact Framework Application which has subfolders containig some files.
For these files Build Action" is set to "Content" and "Copy to Output folder" is set to "Copy Always".
If i build the project, i can see the subfolders containig the files in the Debug/Release folder, but after a Deploy only the files from root Debug/Release-folder gets copied to the device; the subfolders aren't on the device.
Found that the problem exists, when i reference a project (dll-project) containing a subfolder: this subfolder is in the Debug/Release-folder of the main program, but not on the device (a main program containing a subfolder works fine)

You must set the referenced project to deploy and set it's deploy folder to match that of the consuming EXE's deploy folder.

Related

Netbeans to Eclipse migration for Java Projects

I currently switched to eclipse and trying to migrate my projects. I created a java-workspace and used 'File->Open Projects from File System'.
The project with all the folders is added, not only the 'src' but everything I put into it (datasheets, documentation,...). Also the libraries are added two times. One time in the folder and what seems like a link to the compiled library.
folder structure
In netbeans I just added the desired library to the /libs folder and linked it to the project.
Can I manually add folders and/ or libraries to existing projects? Why are there two instances of the libraries?
By using Open Projects from File System, folders containing .java files has been configured as source folders (source code intended to be compiled). This can be undone via right-click Build Path > Remove from Build Path (the reverse function is Build Path > Use as Source Folder).
In the Package Explorer, source folders are shown as virtual folders. If the source folder is not a subfolder of the project, it is displayed as virtual folder in addition to the project subfolder to be able to navigate to that non-source project subfolder (in your case you have a single src source folder and in addition to the non-source folder lib you have multiple virtual lib/... source folders).
The node Referenced Libraries lists all JARs and class folders on the Java Build Path (classpath/modulepath). To remove something from the Build Path, right-click it and choose Build Path > Remove from Build Path. JARs can be added to the Build Path by right-clicking the JAR and choosing Build Path > Add to Build Path. Class folders can be added only via Project > Properties: Java Build Path in the tab Libraries with the button Add Class Folder....
I dont know if this is a workaround or good practice for migration:
Create a new Java-Project in Eclipse
add desired Folder structure (including /libs)
In 'Project->Properties -- Libraries' add libraries manually
Clean and Build Project
I have to test functionality and stability but it seems ok.

Content files are not deployed in the Service Fabric package

We want to deploy a couple of static content files in the service fabric package (configs, metadata). As long as those files are in the root of the package, everything works fine. If we however put them in a subfolder, the files are not included in the package. Is this some kind of bug, is this by design or do we need to configure something?
Update
It seems that the problem is in our own custom deployment code (we package and deploy to service fabric ourselves). This is indeed working, as long as the files are marked with Copy to Output Directory.
Make sure that you've updated the project metadata for any such content files so that the "Copy to Output Directory" property is set to "Copy Always" or "Copy if newer". If the file doesn't show up in the service project's bin folder after executing a normal build, then it for sure won't end up in the generated package.

Deploying GWT in localhost and see that webpage

I am a new user in GWT and I want to deploy one of existed samples in my localhost. I could run the example by eclipse and get the result. But I need to deploy that example in my localhost (IIS). How can I do this?
Copy the contents of your project's war directory to your server's document root. You could create a folder there, mproject for example. Then load your project on a web browser: localhost/mproject to view.
Go into your project's war directory For EX:
C:\workspace\HelloWorld\war
Select all the files & folders available inside war directory.
Zip all the selected files & folders in a file called HelloWorld.zip.
Rename HelloWorld.zip to HelloWorld.war.
Deploy it to the server

What files should I check in for an SSIS project?

In my SSIS project folder I have extra files in addition to the three package (.dtsx) files that I created. There is a ProjectName.database file, a ProjectName.dtproj file, and a ProjectName.dtproj.user file.
When I build the project, the dtsx files are copied to a folder called "bin" inside the project folder.
When I create a deployment manifest, the three package files are copied to a folder called "bin/Deployment" along with a new ProjectName.SSISDeploymentManifest file.
Which of these files should I check in to source control?
I think only the three package files and the deployment manifest are useful to me.
You will want to keep:
*.dtsx - your packages
*.dtproj file - project files
.sln file - solution file - if You have only one project you might not have this one
*.database - take a look at quotation below
deployment manifest file - allows you to deploy your packages to a target location using a wizard
MSDN states following:
The *.database file contains information that Business Intelligence Development Studio requires to open the Integration Services project.
*.dtproj.user and .sln.suo files are not needed because they (from the same link): contain information about your preferences for working with the project.

MSTEST folder deployment question

Is there a way to preserve folder structure with MSTEST deployment?
I have a situation with some existing code where I have .config files in a subfolder (called "Configuration"). I can specify this folder using MSTEST deployment but, in it's infinite wisdom, MSTEST just copies the files from this folder to the run folder (TestResult\\Out), i.e. it does not create a subfolder called Configuration. This royally screws up the code and it fails. I don't really want to have to start using complicated pre-test scripts to create folders etc.
Any ideas gratefully received.
Matt
I think I had the same problem...
My tests used a folder called xsd and I wanted to deploy the folder to the test \OUT directory. When I did this, the files inside the xsd folder were copied to the test \OUT directory, but I wanted the folder xsd into the test \OUT directory...
To solve this I read this. (Wayback machine has an archive of this page here)
If you're using the DeploymentItem attribute, it takes a second argument for the name of the directory to copy the files into. If you use the same name as your folder it preserves everything.
To use your test case you'd do:
[DeploymentItem("Configuration", "Configuration")]
class TestClass
....
and it would work.
Yes, you can. read the article Do MSTest deployment items only work when present in the project test settings file?
It explains how to map deployment items.
In Visual Studio 2012 the output directory is the working directory which means that the DeploymentItem attribute isn't needed for the general case (where you don't have specific per-test or per-class deployment items). You can simply click Project | Show All Files and include the subfolder and files in Visual Studio with the 'Copy Always' or 'Copy if newer' attribute to your project and the files will be copied to your output directory with hierarchy intact. The same applies when running vstest.console.exe from the command line.
See here for more information about Deployment Items in Visual Studio 2012.