Multilingual App Toolkit no longer builds, XLIFF validation failed, "trans-unit" has invalid child element - multilingual-app-toolkit

I just started getting build errors with the Multilingual App Toolkit (in VS 2019). It was working fine a couple months ago, nothing on my machine changed.
Severity Code Description Project File Line Suppression State
Error The XLIFF file failed validation on line 0, Position 0. Message 'The element 'trans-unit' in namespace 'urn:oasis:names:tc:xliff:document:1.2' has invalid child element 'target' in namespace 'urn:oasis:names:tc:xliff:document:1.2'. List of possible elements expected: 'context-group, count-group, prop-group, note, alt-trans' in namespace 'urn:oasis:names:tc:xliff:document:1.2' as well as any element in namespace '##other'.'. PowerPlannerAppDataLibrary C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\Multilingual App Toolkit\v4.0\Microsoft.Multilingual.ResxResources.targets 32
It seems some XSD file has gone missing...

Related

Xamarin Forms, Metadata Error - app used to Build just fine

My first question on the site.
I just came back to my project after 2 days, and have tried out flutter.
My app used to run fine on android, now it gives me a metadata error
Severity Code Description Project File Line Suppression State
Error CS0006 Metadata file
'C:\Users\frede\source\repos\GoogleCalendarStatistics\GoogleCalendarStatistics\bin\Debug\netstandard2.0\ref\GoogleCalendarStatistics.dll'
could not be
found GoogleCalendarStatistics.Android C:\Users\frede\source\repos\GoogleCalendarStatistics\GoogleCalendarStatistics.Android\CSC 1 Active
It may do the trick that delete bin and obj folder and rebuild .
Details refer https://forums.xamarin.com/discussion/99983/can-not-build-anymore-error-cs0006-metadata-file-could-not-be-found.

The "VSCTCompiler" task failed unexpectedly with OutOfMemoryException

What I did is:
I created a new VSIX Project from the Extensibility Template.
I added a new Item for ToolWindow1.
Then I compiled and got the message. It is on Visual Studio 2015.
Memory on computer is 8GB and Visual Studio is installed on brand new computer.
The message I got is as follows:
Severity Code Description Project File Line Suppression State
Error The "VSCTCompiler" task failed unexpectedly.
System.OutOfMemoryException: Out of memory.
at System.Drawing.Image.FromFile(String filename, Boolean useEmbeddedColorManagement)
at Microsoft.VisualStudio.CommandTable.BitmapItem.Read(TextReadVSCTCStream s, XmlElement itemNode)
at Microsoft.VisualStudio.CommandTable.ItemList.Read(TextReadVSCTCStream s, XmlElement listNode)
at Microsoft.VisualStudio.CommandTable.CommandTable.ReadCMDSSection(TextReadVSCTCStream s, XmlElement listNode)
at Microsoft.VisualStudio.CommandTable.CommandTable.Read(TextReadVSCTCStream s)
at Microsoft.VisualStudio.CommandTable.CommandTable.Read(String fileName, ReadOptions ro, IMessageProcessor errorProcessor)
at Microsoft.VisualStudio.CommandTable.CommandTable.Read(String fileName, IMessageProcessor errorProcessor)
at Microsoft.VisualStudio.CommandTable.Compiler.Compile()
at Microsoft.VisualStudio.CommandTable.VSCTCompiler.Execute() VSIXProject1
Is there any way out on this?
It seems that the File created by Visual Studio is corrupted. You can check the file yourself in the File Explorer in the Folder "/Resources" (which should lie next to your .csproj file) and try to open it with another program.
To fix the error, replace the file with a valid .png file. For me it worked by creating a new "ItemTemplate" Project from the Extensibility Templates. Then Add Item -> Custom Command.
This created a valid .png, which can be used to replace the corrupt .png file from the VSIX Project.
Solution found here: https://dotblogs.com.tw/rainmaker/2016/08/23/132552.
If you cannot speak Korean, here is the google translation: https://translate.google.at/translate?hl=de&sl=zh-TW&u=https://dotblogs.com.tw/rainmaker/2016/08/23/132552&prev=search

MVC Scaffolding Error, deps.json does not exists

I'm following along with the Contoso University and I'm running into the HP Computer Platform issue mentioned in this SO question about the scaffolding creation error saying deps.json does not exists in a certain folder.
I'm running Windows 7 Professional and using Visual Studio 2017 Community.
I have changed my Environment Variable, Platform, from BPC to nothing by using set Platform= in command prompt.
Still I get an error when I try to Right Click on the Controllers folder > Add > New Scaffolding Item... > MVC Controller with views, Using Entity Framework > Fill out the form by picking a Model class and Data context class > Add >
Error
There was an error running the selected code generator:
'The specified deps.json [C:\...\bin\BPC\Debug\netcoreapp1.1\ContosoUniversity.deps.json] does not exists'
I have tried cleaning cleaning the solution, restarting Visual Studio 2017, and rebooting my computer to no avail.
Not sure what else I should do to prevent this error. Any suggestions? I feel like copying the files into the BPC folder is a workaround, but not the best solution.
Edit 1
I noticed that the Environment Variable, Platform, got reset to BPC, so I deleted it and rebooted again. Didn't come back.
Now when I try to create the scaffold I get this error:
Error
There was an error running the selected code generator:
'Value cannot be null.
Parameter name: connectionString
at
Microsoft.VisualStudio.Web.CodeGeneration.ActionInvoker.<BuildCommandLine>b_6_0()
at
Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at
Microsoft.VisualStudio.Web.CodeGeneration.CodeGenCommand.Execute(String[] args)'
Edit 2
Setting the Platform variable back to BCP manually brings back the original error.
Copying and pasting all files from ...\ContosoUniversity\bin\Debug\netcoreapp1.1\ to ...\ContosoUniversity\bin\BCP\Debug\netcoreapp1.1\ gets me past that error, but the error from Edit 1 comes back.
Seems I have two separate problems.
Turns out I made a typo in appsettings.json
I had "ConnectionString" instead of "ConnectionStrings" with an 's'
That was causing my Value cannot be null. Parameter name: connectionString error
So, to solve my original problem, follow these steps for Windows 7. (10 shouldn't be much different):
Windows key > Right click on Computer > Properties > Advanced system settings > Environment Variables... > Under System variables find Platform > Highlight Platform > Delete > OK
make sure .json file exists in path specified. and let me know about that what you find.

Private extension galleries error "A connection to the server could not be established [...]"

Added a private VS extension gallery as described in
https://msdn.microsoft.com/en-us/library/hh266746.aspx
using an atom feed as described in
https://msdn.microsoft.com/en-us/library/hh266717.aspx
And got this error message:
"A connection to the server could not be established because the following error(s) occurred:
Could not determine the protocol used for this gallery. The URL must point to an Atom Feed or SharePoint List configured for hosting Visual Studio Extensions.
Please click here to retry the request."
This guy had the same problem but didn't bother to post his solution (and apparently you can't reply once it's "solved"), so here it goes:
Open up the atom.xml file with Notepad++ then check "Encode in UTF-8" under "Encoding".
In the two places where there's an id after the name of the extension and 2 dots replace that id with the one from your project's Guids class. It's the first GUID in there. Alternatively you could open up the vsix file with WinRar / 7Zip and open up the extension.vsixmanifest file there (the GUID is found on top of this file).
Edit: the 2nd id tag should just include the ID and not the name of the project and the two dots - otherwise updating the extension won't work
Remove all those hyphens - in the atom.xml file in the case that you copied that from the example in https://msdn.microsoft.com/en-us/library/hh266717.aspx
The first GUID on top of the atom.xml file (the one after uuid) can be any GUID you'd like to have (create one under Visual Studio's Tools->Create GUID).

Visual Studio 2010 Professional Find and Replace Not Working

My find and replace has stopped working.
Background:
I have a paid version Visual Studio 2010 installed. I also was running a trial version of Ultimate. However, the trial expired so I un-installed Ultimate. After the un-install of Ultimate, I can no longer do a global search in VS Professional.
Anyone have any ideas? Where should Microsoft.VisualStudio.Progression.GraphModel reside and why is it causing my search to fail? I tried running a repair on VS Professional without luck.
Error Message:
In the find results, I get the following:
Find all "test", Subfolders, Find Results 1, "Current Project"
The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.
1) Could not load file or assembly 'Microsoft.VisualStudio.Progression.GraphModel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Resulting in: An exception occurred while trying to create an instance of type 'Microsoft.VisualStudio.Fragments.LanguageContext'.
Resulting in: Cannot activate part 'Microsoft.VisualStudio.Fragments.LanguageContext'.
Element: Microsoft.VisualStudio.Fragments.LanguageContext --> Microsoft.VisualStudio.Fragments.LanguageContext
Resulting in: Cannot get export 'Microsoft.VisualStudio.Fragments.LanguageContext (ContractName="Microsoft.VisualStudio.Fragments.ILanguageContext")' from part 'Microsoft.VisualStudio.Fragments.LanguageContext'.
Element: Microsoft.VisualStudio.Fragments.LanguageContext (ContractName="Microsoft.VisualStudio.Fragments.ILanguageContext") --> Microsoft.VisualStudio.Fragments.LanguageContext
Resulting in: Cannot set import 'Microsoft.VisualStudio.Fragments.EventsManager..ctor (Parameter="languageContext", ContractName="Microsoft.VisualStudio.Fragments.ILanguageContext")' on part 'Microsoft.VisualStudio.Fragments.EventsManager'.
Element: Microsoft.VisualStudio.Fragments.EventsManager..ctor (Parameter="languageContext", ContractName="Microsoft.VisualStudio.Fragments.ILanguageContext") --> Microsoft.VisualStudio.Fragments.EventsManager
Resulting in: Cannot get export 'Microsoft.VisualStudio.Fragments.EventsManager (ContractName="Microsoft.VisualStudio.Fragments.IEventsManager")' from part 'Microsoft.VisualStudio.Fragments.EventsManager'.
Element: Microsoft.VisualStudio.Fragments.EventsManager (ContractName="Microsoft.VisualStudio.Fragments.IEventsManager") --> Microsoft.VisualStudio.Fragments.EventsManager
Found out what was wrong. The reason I switched to Ultimate to begin with was to use this plugin called Code Bubbles (which required Ultimate). When I switched back to Professional after my trial expired, the plugin got into a strange state that was causing other parts of Visual Studio to fail. Once I fully uninstalled the plugin, search returned to normal.
Strange. Have you tried using ctrl + break? As suggested here:
Search stops working for "Entire Solution"
... you should click inside the Find Results window, not the Output window. Once the
blinking text cursor is visible, hit ctrl-break four or five times. That should do the
trick.
- DJ Couchy Couch

Resources