An unhandled exception of type 'System.IO.IOException' occurred in PresentationFramework.dll - resources

Application is unable to load ANY xaml. Nor create empty window "var abc = new Window1();"
Error message is still the same:
An exception of type 'System.IO.IOException' occurred in PresentationFramework.dll but was not handled in user code
Additional information: Cannot locate resource 'wvmlog.xaml'. (for wvmlog.xaml)
Exception occur on InitializeComponent();
These objects are created without error on another PC - so problem is not in Project settings.
Do not help:
reinstall VS
new install of VS
reinstal .net frameworks
undo source from TFS
complete new workspace and load from TFS
visual studio Clean colution
find and delete all cached dll, pbd
remove all obj directories in solution
install and use VS 2010, VS 2012, VS 2013
move VS and solution into another hard drive
Do Help:
Copy of project (help for 1-2 days, then problem appear again without any manipulation with xaml)
Change solution configuration from 'Debug' to 'Release' (help for 1-2 days, then problem appear in Release configuration without any manipulation with xaml)
Problem is at one PC with Win 7, 64-bit.
The problem occur suddenly after some xaml window renaming, but these changes was many times undo-ed, but problem remain.
Maybe some OS damage, or some wpf/.net caches?
Why wpf/.net show such error on project which is compiled without error - so compiler KNOW that these resources does exist?
Any help is appreciated.

I had this very same issue.
What design pattern are you using?
The issue I had was when I changed the output window ie created a new one and deleted the old one.
I am using MVVM so I created the window in the View folder.
If this is your issue, your APP.XAML will look like:
<Application x:Class="dotDiff2013.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>
You then change the startURI to wherever your new window is stored. ie in the view folder.
StartupUri="Main/MainWindow.xaml"
This helped for me. Hope it's the solver to your problem.

Related

Is there a way of avoiding this error message? "Couldn't resolve resource #string/todo Tip: Try to refresh the layout."

I'm creating drafts of an app and I keep receiving the aforementioned error on numerous iterations. I feel like I might have mistakenly revalued the relevant string within the JRE / JDK somehow but I'm not 100% sure
I'm new to the game but have followed all recommended actions within Android Studio help prompts. And it keeps creating new strings within res->values->strings
not sure which section of code to include here
I expect this not to be an issue but it keeps reoccuring.
Please try adding a string resource in strings.xml at
<string name="todo">TODO</string>
The file is located at res/values/strings.xml.
Then rebuild the Android project through Ctrl+F9 key combination.

disability to create new data source

I am going to use Stimulsoft Reports.Wpf (Version: 2010.1.700 from 26 March 2010) to prepare some reports but unfortunately Sometimes when i want to create a new data source,an error is appeared saying :
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
An unhandled exception of type 'System.Reflection.ReflectionTypeLoadException' occurred in mscorlib.dll
last time that i saw this thing , i didn't do anything special about it.surprisingly it was fixed by itself.But this time it seems it is not going to work.
i have searched the internet 1000 of times but i didn't find anything useful.
what should i do to fix it ?
I Have this problem too. i install some font that was used in report. this problem solved.
or may be because of application cant find stimul soft reports needed dll files.
if reports call from another class library project.
if main exe file and class library report caller has different physical path in windows you have to copy stimulsoft report files into main exe file path and also into report caller dll path too.

Visual studio export template replaces original projectname with $safeprojectname$

My project is a mvc4 project in visual studio 2013 ultimate.
I tryd to send my project by following the steps :
File > Export template > (leave all the options as default)
I get a zip that i unpack. If i open the unpacked solution and run the program i get alot of errors. It looks like visual studio replaced all the text that contained the projectname with $safeprojectname$. How can i export the project without visual studio replacing all the 'projectname' spots so that i can run my program.
I tryed creating a new project (console application) with no code in it, if i export it and import it i get the same message first i get :
Warning 1 Load of property 'RootNamespace' failed. The string for the root namespace must be a valid identifier. SvenEind
and after running i get
190 errors 31 warnings
I tryd importing http://www.asp.net/mvc/tutorials/getting-started-with-ef-5-using-mvc-4/building-the-ef5-mvc4-chapter-downloads and that worked for me.
So i guess the problem is in some kind of settings for exporting files.
replaced all the text that contained the projectname with $safeprojectname$
This is very much by design. You created a project template, a cookie-cutter for new projects. You are not supposed to do anything with the .zip archive. It should sit patiently in your "My Exported Templates" folder. Until the day arrives that you want to start a new project.
You then can pick the template instead of using one of the built-in ones that were preinstalled by the Visual Studio installer. Visual Studio prompts you for the project name. It then unzips the archive, copying the files into your new project directory. And modifies the files, $safeprojectname$ is substituted by the new project name you entered. You now have a good start for your new project, using the settings and assets that you saved earlier when you created the template.
Sounds like you had an entirely different use in mind, I can't guess at the intention from the question.
Hmmm. I got this error on Build:
The app manifest must be valid as per schema: Line 42, Column 18, Reason: '$safeprojectname$' violates pattern constraint of '([A-Za-z][A-Za-z0-9]*)(\.[A-Za-z][A-Za-z0-9]*)*'. The attribute 'Id' with value '$safeprojectname$' failed to parse.
So I grabbed the project name from the VS Configuration Manger and put it in the app manifest like this.
<Applications>
<Application
Id="CordovaApp.Windows10"
And the error went away and the project built. HTH.

Microsoft.VisualStudio.SharePoint.targets(418,7): error MSB4131: The "IsDebugging" parameter is not supported

I'm using Visual Studio 2012 to build a empty SharePoint 2013 project (added a test list). However when I try to deploy the project I receive the following:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets(418,7): error MSB4131: The "IsDebugging" parameter is not supported by the "SetPackagingProperties" task. Verify the parameter exists on the task, and it is a gettable public instance property.
I've tried commenting out various lines but it just leads to more problems. Furthermore it then does not package the solution.
The setPackagingProperties task, as documented here http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.sharepoint.tasks.setpackagingproperties.aspx, indeed does not include a IsDebugging property. Therefore is the file C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets incorrect? I'm using SharePoint Found Server 2013.
Thanks for any help - this one is doing my head in!
Turns out that the solution was simple: a conflict of DLLs.
To anyone else with the same problem:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SharePointTools\Microsoft.VisualStudio.SharePoint.Tasks.dll DOES contain the IsDebugging property (undocumented!). My problem was that I had VS 2010 installed with the SP developer tools. This meant that VS 2012 was referencing the incorrect DLL version of Microsoft.VisualStudio.Sharepoint.Tasks.dll. My solution was simple to therefore search the entire system for this DLL and delete all copies apart from the one referenced in the path above.
Pareto's ratio: 80% of time wasted is attributable to just 20% of problems encountered, like this one!!!

Build is producing a .momd in the bundle that is missing the .mom file

I have an app that has been running fine on the iPhone simulator for some time. Recently, I decided I wanted to re-use the data model and related classes in another project - so I dragged them from this project window to the other then told Xcode not to copy, just to make references. At first this didn't work so I jumped through a number of hoops to try to fix it (I may be asking more about that in another post). After all this, I re-compiled and tried to run the original app -- and it's not working any more. On further investigation, I discovered that when I re-compile the original app, I end up with a bundle that contains a .momd package but it contains only a Versioninfo.plist file - no .mom file, no .omo file like I'm expecting to see. I don't recall making any changes to the original app. I don't get any warnings. I just get an incomplete .momd package (and, not surprisingly, my app now crashes).
What's going on here?
BTW, the app now crashes with this message:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
Which I get when executing this line of code:
self.productRegistry = [[UIManagedDocument alloc] initWithFileURL:self.productRegistryURL];
I figured this out by looking more closely at the file locations in the project directory using Finder. In the Xcode window, everything looks normal but in the actual project directory I found that the .datamodeld package had ended up at the top level of the project directory -- at the same level as the project package itself. Xcode apparently did not like this but unfortunately it did not complain -- it just created a partial build output. Once I moved the .datamodeld package into the same folder as the rest of the project's code, everything worked just fine.
This would appear to be just a quirk. I would expect that Xcode would either see that all is well and build correctly OR it would see that things weren't quite as they should be and fail. In this case, it did not build correctly but was silent about it.
Hope this answer helps someone else someday.

Resources