Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9096175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:46:53+00:00 2026-06-16T23:46:53+00:00

I’m trying to create a custom item template for Visual Studio that creates multiple

  • 0

I’m trying to create a custom item template for Visual Studio that creates multiple files. Two of those files are Resource.resx file and a corresponding ‘Resource.Designer.cs’ file.

I’ve managed to display them as a parent-child files with this declaration in the .vstemplate file:

<ProjectItem ItemType="EmbeddedResource" TargetFileName="$fileinputname$Resources.resx" ReplaceParameters="true">Resources.resx</ProjectItem>
<ProjectItem TargetFileName="$fileinputname$Resources.resx\$fileinputname$Resources.Designer.cs" ReplaceParameters="true">Resources.Designer.cs</ProjectItem>

This also declared Resource.resx as an embedded resource.

The problem I’m getting now is that the Resource.resx file doesn’t use Resources.Designer.cs as a code behind file after creating item with this template. As soon as I add a new resource string in Resource.resx file, it creates a new Resources1.Designer.cs file which Visual Studio uses as a code behind from that point.

I’ve examined the changes made in .csproj file before and after Visual Studio creates a new code-behind file and I found that the main reason is because there were no <LastGenOutput> entries for Resource.resx file.

Is there some way to declare <LastGenOutput> through .vstemplate or any other way to connect .resx file with it’s code-behind file without doing it manually?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T23:46:54+00:00Added an answer on June 16, 2026 at 11:46 pm

    It isn’t very clear why you need this template since it is already included with Visual Studio. You select it with Project + Add New Item + General + Resources File.

    If you want to customize it then your best bet is to get started with the existing one. Navigate to C:\Program Files (x86)\Microsoft Visual Studio x.x\Common7\IDE\ItemTemplatesCache\CSharp\General\1033\Resource.zip where x.x is the VS version number and 1033 might be different if you don’t use the English version of VS.

    I’ll just post the .vstemplate file you’ll find there, be sure to copy/paste the file to get started on your own:

    <?xml version="1.0" encoding="utf-8"?>
    <VSTemplate Version="3.0.0" Type="Item" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
      <TemplateData>
        <Name Package="{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}" ID="2390" />
        <Description Package="{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}" ID="2391" />
        <Icon Package="{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}" ID="4565" />
        <TemplateID>Microsoft.CSharp.Resource</TemplateID>
        <ProjectType>CSharp</ProjectType>
        <RequiredFrameworkVersion>2.0</RequiredFrameworkVersion>
        <NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
        <DefaultName>Resource.resx</DefaultName>
      </TemplateData>
      <TemplateContent>
        <ProjectItem>Resource.resx</ProjectItem>
        <CustomParameters>
          <CustomParameter Name="$itemproperties$" Value="CustomTool" />
          <CustomParameter Name="$CustomTool$" Value="ResXFileCodeGenerator" />
        </CustomParameters>
      </TemplateContent>
      <WizardExtension>
        <Assembly>Microsoft.VisualStudio.Editors, Version=9.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
        <FullClassName>Microsoft.VisualStudio.Editors.ResourceEditor.ResxItemWizard</FullClassName>
      </WizardExtension>
    </VSTemplate>
    

    If you want to add more files then add more <ProjectItem> elements.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create an if statement in PHP that prevents a single post
Basically, what I'm trying to create is a page of div tags, each has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am trying to understand how to use SyndicationItem to display feed which is
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I have a small JavaScript validation script that validates inputs based on Regex. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.