Language folders for Silverlight projects when building with Team Build - silverlight

I have a Silverlight 4 project in my solution. When I automate the compilation of the Silverlight project in Team Build, I get in my output folder a long list of folders that have the Silverlight translations in it.
These folders are not present in a local build (compile from Visual Studio), and I don't want them since I am targeting only one language. I have not found a setting to specify to not get these folders, and even better specify the languages I want to support.
Does anybody know how to get rid of these folders, without adding a task to the build to remove the folders.

Open Windows Explorer. Go to C:\Program Files\Microsoft SDKs\Silverlight\v4.0\Libraries\Client.
(C:\Program Files (x86)\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\ if you're running 64-bit Windows). In that location, you will see a bunch of language/culture folders.
Create a new folder. I named mine "Unused Cultures."
Move all the culture folders that you do not want to use to the the
new folder. Be sure NOT to move the "Design" folder, which appears in the middle of the culture folders in the folder list.
In your project, delete the contents of the Bin, Release, etc. folders. Rebuild.
When you want to add support for another culture, just move the one you want
back to the original location.
Whenever you get an update to the Silverlight SDK, you will probably have to do this again.

Related

How to add custom prerequisite for ClickOnce?

I have a WPF application which is distributed by ClickOnce. ClickOnce handles well prerequisite like LocalDb and .Net Desktop Runtime. I started to use Identity in the program so now I need ASP.NET Core Runtime as well, but it is not in the list.
I have sent the problem to MS 3 weeks ago, but no response from them.
https://developercommunity.visualstudio.com/t/ClickOnce-prerequisite-ASPNET-Core-Run/10179285?
I started to look how to add a custom prerequisite but the descriptions was quite old or not detailed. Does somebody have a good description?
UPDATE 1
I did some research.
On windows 10 my Bootstrap directory is at "c:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages". But here are only some of the prerequisite, for example SqlLocalDB2019 but not net 5. Why is that?
I have found some useful stuff, an old and a new. They provided the product.xml and the en/package.xml. I have copied the files to the Packages folder but the new prerequisites did not show in VS. I also tried to copy and modify slightly the existing SqlLocalDB2019 folder but the new version did not show either. What am I missing?
What changes do I need in the two files once the prerequisite appear?
There are two location for prerequisites
"c:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages"
"d:\Program Files\Visual Studio 2022 Community\MSBuild\Microsoft\VisualStudio\BootstrapperPackages"
I did not found the problem the old examples but I was able to add my own prerequisite.
See: https://stackoverflow.com/a/74536380/5852947

A better approach to adding DLLs in VB.NET projects

I want to use a DLL written in C in a VB project such that the DLL will be copied to the output directory.
I earlier asked this question here and got an excellent answer:
VB.Net using C DLL
All you have to do is go to the Project menu and "Add Existing Item". This works great if you copy any updates to your DLL into the project folder. Now I have a new project, and I put my C project folder inside the Visual Basic project folder in hopes that Visual Basic would fetch the DLL from that folder and copy it to the output directory. Oh no, they would never make it that easy. Adding an existing item copies that file to the project folder. So now it always fetches an old copy of the DLL unless I manually fix this, which I do not want to. How can I make Visual Basic honor my wishes?
When you do the "Add Existing Item..." the Add button has two options, one that will add a Link to an existing file and not copy to your project, but it will copy to the build output.

How to organize a Windows Forms applications in Visual Studio 2010

This is somewhat silly, but it's been bugging me. I'm developing a Windows Forms application, and I'm using lots of data sources. When I create them, they're automatically placed in the root of my project. For the sake of organization, I've created a DataSources subdirectory and moved them in there.
The trouble is that when I move the .xsd files from the root my the DataSources directory, the project references break and I need to update the designer file in a few places. How do I avoid this?
For new datasources, just create them in the desired subdirectory. That is right click on the subdirectory and create new component there.
For your existing files I believe the location of file is indicated in: xsi:noNamespaceSchemaLocation="your.xsd"
You should be able the change to add path relative to project, something like: xsi:noNamespaceSchemaLocation="../subdir/shiporder.xsd"> or perhaps just: xsi:noNamespaceSchemaLocation="subdir/shiporder.xsd">
I hope this helps

clickonce file missing

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.

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