I have a bunch of of ASP.Net pages, which I need to localize into Danish and English. I took over the project, and for some pages the ascx.resx and ascx.da.resx files already exists. Some controls have been added since the resource file was created.
I can update the standard resource file (XXXX.ascx.resx) with the missing entries, by "Tools"- -> "Generate Local Resources" (Using Visual Studio 2010).
But, and here comes my question, How can I update the ascx.da.resx?
You can use Resharper and select option Generate Ressource
Link : http://www.jetbrains.com/resharper/features/internationalization.html
Related
So I'm running into this problem with my Visual Studio project.
I'm trying to add a new simple class to my project. I'm pretty sure this is the way to do it.
So whenever I click New Item, this menu pops up:
I can't seem to add anything other than those files. Changing tabs doesn't help. All of them are empty, except for the data tab, which contains The Sql Server Database, XML File and XML Schema. The general tab contains the Text File option.
Any help from you guys is appriciated!
The problem was that my files were stored in the App_Data folder that had been automatically generated. It apprears to be meant for data storage and not logic.
If you have the same problem, move your files to e.g. a Helpers folder.
You can actually add the file upon clicking Add option, there is a class option here:
Regarding additional templates, you can refer to this link for solution:
no templates in Visual Studio 2017
I have multi Language Application, first it was made in English only,
than one time i added support for German and Russian version and send resx files for translation to mates.
But while they do translation, i added few more checkboxes in GUI
and now when i copy their files and load German \ Russian GUI version those not translated checkboxes do not shown in in those languages.
My Question is:
Is there a way to update localized .resx files to version of main, as i can see it:
in Localized files if controls are missing - they will display in default language.
For translation they used: Zeta Resource Editor
Found answer by myself :) Maybe someone need it:
In this free program (Zeta Resource Editor) You can Add group of existing resources from Your VS Project - just select them an add, Zeta Resource Editor will auto show which strings are missing, so you can easily find them.
I have Java background and am trying to start on C#.
I wanna create a lib in C# that will be used in other solutions. In Eclipse it's just a matter of creating a jar and adding it to classpath. I know each project in VS2013 becomes a dll, but how can I make a solution see these dll?
Also, in Eclipse, we can create a Web Fragment Project. It can have Servlets, jsp and static js and css files, it becomes a war file and can be imported into another project and its files be used in that project.
How can I do that in VS2013? I'd like to create a solution with static files, master page, some aspx stuff, C# dll, and then use them all in other solutions.
Is there any tutorial (I googled it but found nothing) teaching how to do it?
You have a few options depending on your preferences and scope
Option 1 - The Class Library
You can create Class Library, that can be referenced in your website project. The Class library is a library of classes, interfaces, and value types
You can either Add an existing/New Class Library project to your website solution and reference it directly
You can add the project to your solution by right clicking the
solution (inside VS) -> Add -> Existing project -> and navigating to said
project's .csproj file
or
You can use a new/existing Class Library Project - build it and reference the built dll in your website solution.
you can right click your website solution (inside VS) -> Add -> new project -> choose Class Library
After you've done one of the above ->
Right click the project, you want to add the reference to
Click "Add Reference"
navigate to the .dll in question.
If the dll you want to reference is part of your current solution (as in step 1) -> after you've pressed "Add Reference" - press the "Solution" Tab and it should show up
After you've added the dll.
Remember to reference it in your code files with
Using TheReferenceNamespace;
which will allow you to call the functions inside you dll like the following
FunctionInsideDll(param);
or you could fully qualify your calls instead, like the following
TheReferenceNamespace.FunctionInsideDll(param);
Option 2 - Share MasterPages
if you just want "shareable" masterpages
you can do the following - (taken from this -> MSDN article)
(for future reference - web archive link - just in case something gets moved)
Precompile the Code Used in a Master Page
If you are concerned about code in your master pages being visible to others reusing the pages, you can precompile the master pages' code into a library. In this library, you can include code-behind pages as well as user or custom controls. Compiling master pages does not remove the declarative code for the master files or any server controls used, but you can compile the master files to remove the code for controls or code-behind pages used by the master pages.
If you choose to compile the master pages into a library, you must use the "updatable" build option that allows for later modification of the markup. This option is determined by the Allow the precompiled site to be updatable check box in the Publish Web Site dialog box. For more information about precompiling pages into a library that can be reused, see Building Re-Usable ASP.NET User Control and Page Libraries with VS 2005.
Option 3 - The template
Create a template, and use that template for different projects
In Visual Studio - Press "File" -> Export Template -> follow the wizard.
After it has been exported and you've imported it (either through a checkmark in the wizard or double clicking the vsix file) -it will show up under your project templates when you create a new project.
You can include a project from solution A in solution B by right-clicking on solution B and choosing "Add existing project"
Don't be afraid to edit XML .csproj files. For instance, this works ...
<Compile Include="$(Codez)\z.Libraries\diff-match-patch\DiffMatchPatch\**\*.cs"
Exclude="NotThisOne.cs;**\NotThisFolderWith\This*.cs">
<Link>Libs\%(RecursiveDir)%(Filename)%(Extension)</Link>
</Compile>
...and will give you all the C# files from the source folder, and subfolders, as linked files in your destination project under a folder called \Libs\.
$(Codez) is a Windows Environment Variable I use on my PCs.
I also could have used *.* at the end instead of *.cs.
This is one of those things Visual Studio might break on you, adding a file into the folder full of wildcard-linked files may break them out to separate entries. Or not. Depends on the wind.
I found something related here but did not give me a good start
Since recently I do a lot of webPart development I want to automate the none-code part of the process, I want to develop a small console app that creates SharePoint solution as the pic, i'll use it as a template for the upcoming webParts
assume the webpart name is a var
string webPartName = "usefulLinks";
Create Empty SharePoint Project
Add Visual WebPart webPartName
Create Classes Folder WebPartName
Create an empty class inside the folder
add the Layouts mapped folder
add css and img folders to the layouts folder
Change part of the .webpart content to custom values
Same to the Elements.xml file
add the Resources mapped folder and add two resources files for Arabic and English
and finally change the feature name to be like webPartName + Feature
any good starting points? or online resources
thank you.
What you are really describing is a custom SharePoint Solution Project, not a Visual Studio solution.
Project templates provide the files that are required for a particular project type, include standard assembly references, and set default project properties and compiler options.
This section in MSDN covers how to create project templates for Visual Studio. In particular, it sounds like the best option for you is the "Export Template Wizard", which will create a template based on an existing project you have created.
I have tried creating an install file but it never includes the database in the output, I have run into this problem a few times and most of the answers I find online are too cryptic for me to wrap my head around.
In the Project menu, select Add existing item, change the file type to Data Files and select your database. Then go to your project properties, in the publish tab, click the Application Files button and make sure your access file is include.
If you include your MDB as a resource (Properties -> Build Action -> Embedded Resource) you can extract it using: Assembly.GetExecutingAssembly().GetManifestResourceStream(name);
See here for a complete sample (that also decompresses):
http://code.google.com/p/videobrowser/source/browse/trunk/MtnFrameGrabProvider/Plugin.cs