Replacing the csproj is a problem?

Asked

Viewed 250 times

-1

For the second time, man .csproj.user was detonated. I don’t know why this has happened or what can influence this file. Well, this is a new project I did, using the .Net Standard. When I open the .csproj.user I have it:

NULLNULLNULLNULLNULLNULL.... I have another project that was left, but the Android project is exactly like mine and the .csproj.user is like this.

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <SelectedDevice>Samsung SM-J500M</SelectedDevice>
    <DefaultDevice>VisualStudio_android-23_x86_phone</DefaultDevice>
  </PropertyGroup>
</Project>

Now, before there was no file .csproj. After downloading from the TFS he came, in reality the two: .csproj and the .csproj.user. I honestly don’t know why that last one .csproj.user I don’t know what he does and what it’s for. Even lowering the .csproj my project does not run, it is not loaded and even giving Load it remains outside the project. What can I do in this sense? It is a project Android with Xamarin.Forms and project .Net Standard.

  • I tried a solution: I rewrote the .csproj.user by a working. Now Android is loaded, but missing some things, among them the MainActivity. I can copy and paste the MainActivity in the folder of Android?

  • delete .csproj.user file and reopen the project by . csproj from the built-in project manager

1 answer

0

The archive csproj is an xml that stores the structure of folders, files, references and other properties related to the project itself.

The archive csproj.user as far as I know is generated by the visual studio and stores some information about the development environment in the visual studio itself, for example: which files of that project are open in what kind of editor and things like that. I mean, he’s expendable.

In visual studio we have a structure based on Solution, which contains one or more projects. The file sln is also an xml with objectives similar to that of csproj, but in this case seeking a solution. For example: which projects in that directory are part of the solution, which ones are marked for build and deploy, their execution configuration profiles, among others.

For your problem, I suggest deleting the folder .vs (Must be hidden as folder in the solution directory), the files .user and delete the directories bin and obj of all projects. Then, includes the projects that are outside the solution again, makes a clean and rebuild all. there must be some cache with trash.

I hope it helps

Browser other questions tagged

You are not signed in. Login or sign up in order to post.