Skip to content

How to generate resource file (.resx and designer.cs) in mac vs code #27115

Closed Answered by pictos
jingliancui asked this question in Q&A
Discussion options

You must be logged in to vote

Not sure if this something related or VS Code extensions, by default the Resource.Designer file is generated during DesignTimeBuild and VScode doesn't have it.

If you want to create it on VSCode during build, you can add the following instructions in your csproj, it will generate the AppResources file in obj folder and include it in the build proccess.

	<ItemGroup>
		<EmbeddedResource Update="Resources\Localization\AppResources.resx">
			<Generator>MSBuild:Compile</Generator>
			<StronglyTypedLanguage>CSharp</StronglyTypedLanguage>
			<StronglyTypedNamespace>MauiApp.Resources.Localization</StronglyTypedNamespace>
			<StronglyTypedFileName>$(IntermediateOutputPath)\Resource.Designer.cs</St…

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
8 replies
@pictos
Comment options

@giuseppenovielli
Comment options

@jingliancui
Comment options

@giuseppenovielli
Comment options

@pictos
Comment options

Answer selected by jingliancui
Comment options

You must be logged in to vote
2 replies
@pictos
Comment options

@jingliancui
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants