XNA - Reconnecting Content Project - visual-studio-2010

I'm working with XNA 4 in VS2010. Recently a crash corrupted a .contentproj file of mine. So I deleted the content project inside VS, created a new one and repopulated it with the contents of the old one. However the new content project did not properly hook up to the rest of the program, whenever I build the program its contents aren't translated to .xnb-s and placed inside the content folder of the game as when I built the program with the original content project.
I'm sure I'm missing a step in reconnecting the new content project, I just can't seem to be able to find out what that step is. Any ideas?
Thank you.

Take a look at the properties of the imported files in Visual Studio and check they are correct. Check the Build Action specifically. It should be set to Compile.

I found a way to make it work. More a workaround than a solution, I created a new VS solution, imported everything other than the content project from the old one and used the content project that came with the new solution.

Related

Can't add .tsx files to Node.js Web Application project

I created a new Blank Node.js Web Application in Visual Studio 2015, and I'm unable to add .tsx files to my project and compile them. When I do so, the created .tsx file is put into a Virtual Project instead, even though it is present in the actual project as well. The project is set to compile JSX expressions as React calls.
It took me some time to track down what's happening behind the scenes, and what happens is that when a .tsx file is created in the project (through Add -> New File), it is created as a Content entry in the project's XML file, instead of a TypeScriptCompile entry. This is clearly an error.
I can fix the issue by manually editing the project's XML file, but no way I'm willing to do that for actual production in 2016, with hundreds of files.
Step-by-step guide to reproduce the error
Create a new Blank Node.js Web Application project
Create a new .ts file in the new project
Create a new .tsx file in the new project
See that the displayed "host project" of the .tsx file (check the top-left corner of the editor window) says "TypeScript/JavaScript Virtual Projects".
How can I make it so that .tsx files are included in the project exactly how .ts files are?
Edit
This is not a problem with a HTML Application with TypeScript project, but that project type contains a lot of unnecessary C# bloat that I don't need.
I can fix the issue by manually editing the project's XML file, but no way I'm willing to do that for actual production in 2016, with hundreds of files.
This has to do something with the project template, and is likely a bug. A possible workaround in the meantime is creating the new file as a .ts file, and then renaming it to .tsx.

XCode, Swift (Domain = NSPOSIXErrorDomain, Code = 22)

My friend came to me with a small request of creating a video portfolio app. I thought it was a good excuse to try out Swift, which is what I did. (The app is not intended for release on the app store, only to distribute via Testflight)
I've run into some trouble where I'm getting the following error when trying to run my project:
An error was encountered while running (Domain = NSPOSIXErrorDomain, Code = 22)
The error appeared after adding a directory with .mp4 video files to my project in my "Bundle Resources". It concerns 6 .mp4 files at around 1.2gb in total.
As I couldn't figure out why the error happened in the first place, I decided to re-do my entire project (copying over bits and pieces). The project ran just until the part where I added the folder containing the videos.
I've tried removing both the reference and the folder, but the error consist. I really want to get to the bottom of this, so that I instead of having to create a new project, I can just remove whatever files are creating the problem.
Thanks in advance.
In my case, I had created the directory "Resources" absentmindedly and added it as a reference to my project. Renaming this folder, cleaning the project, and deleting the derived data (~/Library/Developer/Xcode/DerivedData/) fixed it for me.
Check infoplist file under TARGETS -> General - > Identity.
Please add the new infoplist file if missing in project folder. For new info plist values you can create new dummy project and copy, rename the infoplist file from there.
Maybe the files with the extension ".m" are not in "Compile Sources".
Click in the Target > Build Phrases > Compile Source and look if "main.m" and others ".m" files are added here.
in my case, i missed the bundle ID. check if you have filled the bundle ID field in your project.
(In my case ,it is becasue cloud_firestore)
Did you import cloud_firestore?
if yes ,please Try low version

Create File Structure

Hello I've got a little problem while trying to create a new Project.
My aim is to get a total folder for sourc files, headers, external dependencies and ressource files auto generated.
Visual Studio does not create this folder for me.
I tried to activate and deactivate the plug in for controlling source code folders but it doesnt help.
At the beginning, when i ve created my first couple of projects it automaticallyy generated this folder. But now I do get nothing but my Project file without a source or a header folder
Thank You for every Help
When you are creating a new project there is a check box right above the OK button that says "Create a directory for this solution". Make sure this box is checked.

Xap packaging failed. Object reference not set to an instance of an object

I'm getting this error message on my PC when I try to build my Windows Phone app:
Xap packaging failed. Object reference not set to an instance of an object
I'm using Dropbox. On my laptop, It works perfectly fine and I can debug etc...On my PC however, I can't.
I tried many things such as:
Delete obj/Debug Folder
Check for files which are missing on the Solution Explorer
So far, nothing has helped.
Any idea how I can fix this?
You should check, in every folder of your project, for missing files or wrong references.
You can get this problem just with a single missing image, if its Build Action property is set to Content or similar...
Check your files and then Rebuild your project!
This can happen if a file is removed from the disk itself, but not from the Solution through Visual Studio. Delete the file through Visual Studio (it should be marked with a little yellow hazard icon) and Rebuild.
Credit to Andreas Hammar via http://blog.jayway.com/2011/06/03/wp7-build-error-xap-packaging-failed/ - his solution worked for me.
I am adding this reply because although the problem with app icons is covered in brief in some of the answers above, I wanted to give exact steps since it just happened to me. I got this error and then found this web page:
Xap Packaging Error
It turned out that my App icon file name was wrong due to a rename. I double-clicked on WMAppManifest.xml, found in the Properties folder, to open the editor for that file. I simply used the button to update the App Icon, re-found the file and selected it, and the error went away after rebuilding the project.
The problem lies in your startup object in your Application. I have met this error to many times.
It usually happens when I change the name of my class/namespace Application class. Or it might even be conflicting with your dropbox locations.
To Fix this.
Right click your main project or Alt+Enter
Go to the silverlight tab and set your startup object
Try the following:
Have Visual Studio closed
Download all your files to your computer
Delete Bin and obj folders completely.
Open the .sln
Rebuild
If if fails expand the References in te Solution explorer and make sure all your dll's are found. If a dll have a yellow exclamation point that means its not found. I'm thinking that one of your references are set to an absolute path on your laptop and that's missing on your PC.
If someone comes across this post and still has the issue I had where XAP packaging failed and that VS2012 can not find the file then check for spaces in the file name.
I had the issue where my tiles were "tilename 99.png" and it keep giving me the XAP packaging failed message. So I finally changed the file name to "tilename_99.png" and it worked.
Hope this helps someone in the same predicament.
In my case, I'd accidentally moved Background.png to a resource folder. Moved it back and it worked!
In my case, this error didn't go away even after trying all the above methods. Actually I had renamed the ApplicationIcon.png to "xyz.png". And reverting this, fixed the issue.
One more possibility is that you have a wrong path to an image in the project/options/Application dialog (icon, bg image, etc).
I had this error message, after some frustration I look in the obj folder, is was no part of the solution(but visual studio need it) but I had some conflicts files with dropbox. I deleted the obj folder rebuild, visual studio recreates the folder and the content of it and problem solved.
Ahh finally found my problem.
I'm using Visual Studio 2012, which doesn't always point out the "missing" file and makes it a little harder to fix.
MY SHORT SOLUTION
Relink the "linked" configuration file in the main project. It is a linked file because the original file remains in a referenced assembly, not in the current assembly. The file wasn't marked YELLOW so it wasn't obvious that it would be the problem, but when I double clicked on it, it failed to open, so I knew this was the problem file.
The silverlight application itself had a "linked" file called "ServiceReferences.ClientConfig" which contains information needed by a referenced project to make a web service call.
So the main project didn't have the web service reference itself, but it referenced a project which did, which is why it linked the "ServiceReferences.ClientConfig" file.
MY LONG SOLUTION
Keep rebuilding the main project file, and commenting out, and excluding project by project, file by file, until you CAN build the main project again. At that point it should be clear(er) which part of the solution is causing the problem.

generation of designer file failed

Every few days VS2008 decides to get mad at me and fails to generate a designer file claiming it cannot find the file specified and that it's missing an assembly. Here's the scenario:
The aspx page has a reference to a custom user control (inheriting UserControl) which references another assembly in the backend. There are many other references to this "missing" assembly in other places in code which don't throw errors. rebuilding, updating the source to the clean copy, shouting at the computer, punching the screen, etc all fail to work.
Any suggestions? This is quite annoying.
We've had similar problems before, unfortunately I don't remember the exact solution.
If your using a "Web Site" project (no project file) then start by checking that both your page and your control both set the ClassName property in the first line of your aspx/ascx file and that you specify the full name of the class including the namespace.
Example:
<#Control Language="VB" AutoEventWireup="false"
ClassName="YourProjectName.YourUserControl"
Inherits="YourProjectName.YourUserControl"
CodeFile="YourUserControl.ascx.vb"
%>
Many times not setting all of these will still work but you will get odd compiler errors and behavior in VS.
If you using a Web Site Application project try deleting the designer file manually and then right click on your project and choose "Convert from Web Application." This will should recreate the designer file for you.
My only other suggestion would be to recreate the page and/or the user control from scratch.
Jared, you've hit it. Using "Convert to Web Application" to manually generate the designer file solves my problem. I'm glad you posted this before i started reinstalling. Thanks.
You might try archiving a template of a new file with its designer equivalent. If VS coughs then you can do an "Add Existing" option with the file you already have.
It seems, however, to be an issue with your installation of VS2008 so you might try reinstalling it.
I found that using a custom control, you would need to add a reference to the .dll. This fixed it for me after migrating from a web site to web app.

Resources