Two output file names resolved to the same output path - resources

I have a project in VS2013, where I use the report from Telerik.
In the solution I have one report and a few classes. If I copy the first report rename it, Visual Studio reports error:
Two output file names resolved to the same output path: "obj\Debug\...
If I Remove the copied report and try to through the wizard add a new report to project, VS report me the same error.
Do you have someone with experience and someone you do not know the solution?
Thank you

I got this error when using entity frameworks code first migrations and had the same name for two of my migrations in the Migrations folder.
Two output file names resolved to the same output path: "obj\Debug\***.resources
I deleted the duplicate migration.cs file and the error went away. running add-migration again with the same name brought it back.

I had three files for a userControl, all sharing a common partial class, and this caused my issue; they were named ucPlate.cs, ucPlate.Map.cs, and ucPlate.Graphics.cs. When I changed ucPlate.Graphics userControl surface to DoubleBuffered, I got the compilation error, "Error 21 Two output file names resolved to the same output path: "obj\Debug\ASMS.Controls.ucPlate.resources" Reverting to DoubleBuffered = false did not fix it, nor did deleting the .resx file that was created when I turned on DoubleBuffered (previously, there was no .resx file).
The root cause was that turning on DoubleBuffered in the subsidiary partial class file auto-added InitializeComponent() to the bottom of my code for that file. This method indicated the duplicate ucPlate name, forcing a .resx creation that already existed for the ucPlate.cs file. I had expected it to be ucPlate.Graphics.resx.
private void InitializeComponent()
{
this.SuspendLayout();
//
// ucPlate
//
this.Name = "ucPlate";
this.ResumeLayout(false);
}

go to the solution explorer (if you rename a form e try to look at your error and delete the .resx file that have in your error)

Related

Package name contains unexpecting level com.tmp

My Android Studio application called calendar contains package spectorsky, and it works. However, when I try to save the settings by
SharedPreferences calendarSettings;
calendarSettings = getSharedPreferences("calendarINI", Context.MODE_PRIVATE);
calendarSettings.edit().putLong("TimeZone",Double.doubleToLongBits(Riseset.timezone));
and then seek saved xml via Device File Explorer, I see my package on the strange level `com.tmp.spectorsky.calendar', see printscreen:
My file system on the hard disk does not contain tmp directory anywhere concerning this application. I see that the package names on other examples contain com level (somewhat like com.package.app), but no tmp domain is observed.
So, the question: why tmp level appears in my package name, and can (and should) I get rid it?
Level com.tmp was written it two places: in the manifest file AndroidManifest.xml and in the gradle (right-click on the app in project view, Open Module Settings, ApplicationID). Then, after cleaning the project, wrong com.tmp.... directory can be deleted from the Device File Explorer.

Android Studio 2.3.2 Gradle Error

I am new to Android Studio, and everything was going fine until I received a nonsense error:
"Error:Execution failed for task ':app:processDebugResources'. > Duplicate symbol in table with resource type 'id' and symbol name 'title_conctact'"
I have no idea what it means and I have tried to fix it for two days. I tried uninstalling Android Studio which deleted all my progress, but still, the error remained. Please help, this is annoying. By the way, I am using the latest version 2.3.2.
hi after finding so much on web i don't get any solution so i tried myself to debug it and i got success to fix this issue you need to find the name in files in your case the name is title_conctact so you will get duplicate id's, now you need to rename and make them unique
that's it your problem will be fixed
I had the same issue. The issue I had was due to the keys declared differently in one of my module's resource file and my app's resource file.
In the module's strings.xml file, if you declare the key as 'title.conctact' and in the app's strings.xml file if you declare it as 'title_conctact', then you will face this error.
Changing it to a single format resolved my issue.
Double-clicking SHIFT will open a window. Put the title_conctact inside the search and you will find the .xml file that contains the duplicate id

Error: A namespace cannot directly contain members such as fields EntityFramework.dll' could not be found

enter image description hereI want to create model: add > class > ado.net entity, for my db first project and also want to create CRUD operation by asp.netscaffolding, but failed to create a model with necessary code.and thus i failed to create scaffolding .
in my model file AllahHelp.Context.cs, there is no code, only the text "ErrorGeneratingOutput".
Error 1:
A namespace cannot directly contain members such as fields or methods F:\project\WebApplication8\WebApplication8\Models\AllahHelp.Context.cs 1 1 WebApplication8
Error 2:
Compiling transformation: Metadata file 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools..\IDE\EntityFramework.dll' could not be found F:\project\WebApplication8\WebApplication8\Models\AllahHelp.tt 1 1 WebApplication8
If there is an error transforming your .tt files into class files, your class files will just have "ErrorGeneratingOutput" in the source file, which causes a "namespace cannot directly contain members such as fields" error, but doesn't really have anything to do with that.
Your actual error sounds like you're missing a reference to EntityFramework.dll. Right click the project, choose "Manage NuGet Packages..." and find and install EntityFramework to your project.
In some situations I've also run into a problem where since the transformation occurs before files are copied, referenced dlls don't ever get copied since the error occurs and stops the process. In this case you would need to remove the model from your project temporarily, successfully compile the project, and then add the model back.
According to this similar question it could also be because of your install path. If that is your issue, try to find where the dll is, and correct the environment variable VS120COMNTOOLS (Control Panel -> System -> Advanced System Settings -> Environment Variables -> System Variables)
(Be careful changing system variables, though.)
I was getting this error when attempting to build a project using .tt templates. I fixed the issue by checking everywhere that I used C# code injection and making sure that I closed each section of C# code by including #>.
Example:
Problematic code:
{
"find": "__LOCATION__",
"replaceWith": "<#= deployment.Location"
},
Fixed code:
{
"find": "__LOCATION__",
"replaceWith": "<#= deployment.Location #>"
},

Why missing <SccProjectName> in project file cause "The project file is not bound to source control"

I had a very annoying problem, I have found a solution, but I would like to ask you why it behaves like that...
I am using Visual Studio 2012 with TFS 2012. Everything was fine, but one day I have spotted a problem. When I have added a new project to my solution, then I have always obtaining this message every time I have reopened the solution:
This project file ... is not bound to source control, but the solution contains source control binding information for it. Do you want...
Whatever I have done, I still have this message. In the File->Source Control->Advanced->Change Source Control...' window every thing was fine. The *.vspscc files where properly created with good content. I was removing the binding and adding it again and again, but it was not helpful. All the time I had this annoying message...
And then I have spotted one difference in the *.csproj files. My problematic project did not have the following XML data:
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
When I have added those lines, problem was solved...
Is there anyone who can tell me why those elements where missing and why they cause such never-ending problem with annoying message about solution binding?
Thank you
This happens because the Solution file has the Source Control Information in it and the .csproj file will just implement what the solution file tells it.
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
The SAK referes to "Should Already Know" as it pulls the information from the solution file.
The solution file should contain something similar to what is shown below
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 4
SccEnterpriseProvider = {3BA58AB2-18FA-4F8D-95D4-32DDF27D184A}
SccTeamFoundationServer = http://TFSSERVER:8080/tfs/DPC
SccLocalPath0 = .
SccProjectUniqueName1 = Project1\\Project1.csproj
SccProjectName1 = Project1
SccLocalPath1 = Project1
SccProjectUniqueName2 = Project2\\Project2.csproj
SccProjectName2 = Project2
SccLocalPath2 = Project2
SccProjectUniqueName3 = Project3\\Project3.csproj
SccProjectName3 = Project3
SccLocalPath3 = Project3
SccProjectUniqueName4 = Project4\\Project4.csproj
SccProjectName4 = Project4
SccLocalPath4 = Project4
EndGlobalSection
Now what can happen is that if the person first checking in the solution and projects doesn't include the Solution.vssscc file then Visual Studio can't determine the source control. if this occurs delete the vssscc file and close the solution. reopening the solution will create a new vssscc file, ensure this gets checked back into source control.
Another thing to check when adding a project make sure that the solution file gets checked out and then checked back in again when you submit the project.
As long as the solution file and vssscc file are handled correctly by source control then when you add a new project it should pick up the source control settings from the solution file and then apply the SCC Nodes to the new project

Funnelweb migration causing errors because of invalid folder name

I have a folder named "view" and this seems to be causing some errors while migration. Can I rename it on the fly? Is there an example for doing this?
Add the name under invalid_ids under the urltidy step in your pipeline.cfg.
[urltidy]
invalid_ids = view
"layout" is another that seems to cause problems.

Resources