Last post Jun 29, 2017 07:04 AM by zxj
Jun 23, 2017 12:40 AM|Sl-lAD0W|LINK
Hi, I have a project to do that require me to push my ASP.NET Web Forms Site to GitHub but right now I am having some problem. I use a .gitignore that takes out /bin and /packages from the project because from what I understand it's not needed. When
I commit to Git I commit The "Websites" file that is only missing the /bin and the "Projects" file that only contain a ".vs" file and a "*.sln". When I checkout that branch on an other computer the nuget are all dead and there is no reference anymore. Am I
doing something wrong? I can restore the nuget but I get a ton of error to some things missing like "optimization" and other thing like that.
Jun 23, 2017 01:45 AM|EvenMa|LINK
According to your description, in default, the folder packages and bin won’t commit.
You said there seems lost files, I suggest you could run the following command before commit.
git add -a
When others pull the code, there will no packages and bin, VS will auto restore them when compile.
If you still has error, could you give the GitHub Address to me, I will try it.
I also suggest you could use the default .gitignore file, see the following content.
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
# User-specific files (MonoDevelop/Xamarin Studio)
# Build results
# Visual Studio 2015 cache/options directory
# Uncomment if you have tasks that create the project's static files in wwwroot
# MSTest test Results
# Build Results of an ATL Project
# Chutzpah Test files
# Visual C++ cache files
# Visual Studio profiler
# TFS 2012 Local Workspace
# Guidance Automation Toolkit
# ReSharper is a .NET coding add-in
# JustCode is a .NET coding add-in
# TeamCity is a build add-in
# DotCover is a Code Coverage Tool
# Web workbench (sass)
# Installshield output folder
# DocProject is a documentation generator add-in
# Click-Once directory
# Publish Web Output
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
# NuGet Packages
# The packages folder can be ignored because of Package Restore
# except build/, which is used as an MSBuild target.
# Uncomment if necessary however generally it will be regenerated when needed
# NuGet v3's project.json files produces more ignoreable files
# Microsoft Azure Build Output
# Microsoft Azure Emulator
# Windows Store app package directories and files
# Visual Studio cache files
# files ending in .cache can be ignored
# but keep track of directories ending in .cache
# Since there are multiple workflows, uncomment next line to ignore bower_components
# RIA/Silverlight projects
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
# SQL Server files
# Business Intelligence projects
# Microsoft Fakes
# GhostDoc plugin setting file
# Node.js Tools for Visual Studio
# Visual Studio 6 build log
# Visual Studio 6 workspace options file
# Visual Studio LightSwitch build output
# Paket dependency manager
# FAKE - F# Make
# JetBrains Rider
# Python Tools for Visual Studio (PTVS)
If you have any other questions, please feel free to contact me any time.
Jun 23, 2017 02:13 AM|Sl-lAD0W|LINK
Thanks for the quick answer. So here are the step I did.
1-Created a ASP.NET Web Forms Site.
2-Took the "Projects" folder and the "Websites" folderthat only contain the site that I created.
3-Took the gitignore file you gave me in your answer and put it in the same folder as the other 2 folder
4-Commited and pushed those things to git. So on my github interface I see 2 folder and 1 gitignore file on my commit.
5-Downloaded that project
7-Open Visual studio 2017 and use the open project/solution option
8-Get the ".sln" file that is in the "Projects" folder
9-I get that error on build :
Severity Code Description Project File Line Suppression State
Error The CodeDom provider type "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=22.214.171.124, Culture=neutral, PublicKeyToken=31bf3856ad364e35" could not be located. C:\Users\Simon\Desktop\GRYB-PFE-Simon\GRYB-PFE-Simon\WebSites\GRYB_Admin\Web.config
10-I can get that error to go away by installaling that Nuget but then there is like 20 error that comes up for the other Nuget.
Is there something I don't understand?
Jun 23, 2017 05:15 AM|EvenMa|LINK
According to your description, that’s so hard to give your correct suggestion.
You said there still has 20 more errors, might there still missing some assemblies with your project, I’m unsure why.
Jun 25, 2017 07:53 PM|Sl-lAD0W|LINK
Here is the result of what I am downloading from GitHub. https://ufile.io/oxgmq ; I tried with packages and without but the only way I got it to kinda work was with the /bin in the git repo. If you want to download the
file and try to import it. It's the zip I downloaded from my Git repo.
Jun 29, 2017 07:04 AM|zxj|LINK
I'm not sure why this doesn't work for you. In case it helps, here's a typical .gitignore file.
Here's a pretty comprehensive example from github: