0 / 0 / 0 Регистрация: 11.10.2020 Сообщений: 24 |
|
1 |
|
16.09.2021, 18:38. Показов 5008. Ответов 17
Люди добрые! Кто шарит, помогите пожалуйста с этой ошибкой. Скачивала заново VS, создала новый проект, простой, с Hello World! и тут вылезла эта ошибка. Очень больно. Помогите.
0 |
Администратор 15655 / 12616 / 4999 Регистрация: 17.03.2014 Сообщений: 25,652 Записей в блоге: 1 |
|
17.09.2021, 00:45 |
2 |
Student_9999999, покажите содержимое файла проекта и файла %appdata%/nuget/nuget.config
0 |
0 / 0 / 0 Регистрация: 11.10.2020 Сообщений: 24 |
|
17.09.2021, 17:19 [ТС] |
3 |
покажите содержимое файла проекта Не совсем поняла что именно нужно показать, и еще я не могу найти
файла %appdata%/nuget/nuget.config
0 |
Администратор 15655 / 12616 / 4999 Регистрация: 17.03.2014 Сообщений: 25,652 Записей в блоге: 1 |
|
18.09.2021, 00:17 |
4 |
Не совсем поняла что именно нужно показать Содержимое файла ПР2_ЧМ.csproj
не могу найти %appdata%/nuget/nuget.config Откройте папку C:Users<ВашеИмяПользователя>AppDataRoamingNuGet
0 |
Student_9999999 0 / 0 / 0 Регистрация: 11.10.2020 Сообщений: 24 |
||||
18.09.2021, 15:17 [ТС] |
5 |
|||
ПР2_ЧМ.csproj
надеюсь что это
Откройте папку C:Users<ВашеИмяПользователя>AppDataRoamingNuGet Получается, что этого файла у меня нету. Может я не правильно просто установила VS? где то не там галочку не поставила…
0 |
Администратор 15655 / 12616 / 4999 Регистрация: 17.03.2014 Сообщений: 25,652 Записей в блоге: 1 |
|
18.09.2021, 16:04 |
6 |
Получается, что этого файла у меня нету. Сильно в этом сомневаюсь. Покажите скриншот этой папки. В неё кстати можно еще зайти так. Нажимаем Win+R, вводим
1 |
Student_9999999 0 / 0 / 0 Регистрация: 11.10.2020 Сообщений: 24 |
||||
18.09.2021, 16:22 [ТС] |
7 |
|||
NuGet
ура ура я нашла nuget.config Добавлено через 1 минуту
0 |
Администратор 15655 / 12616 / 4999 Регистрация: 17.03.2014 Сообщений: 25,652 Записей в блоге: 1 |
|
18.09.2021, 16:43 |
8 |
Student_9999999, в этих двух файлам ничего криминального нет. Покажите что у вас в настройках Visual Studio. Меню Tools Options. Ветка NuGet Package Manager Package Sources.
1 |
0 / 0 / 0 Регистрация: 11.10.2020 Сообщений: 24 |
|
19.09.2021, 12:31 [ТС] |
9 |
Меню Tools Options. Ветка NuGet Package Manager Package Sources. Так? Миниатюры
0 |
3094 / 2236 / 641 Регистрация: 02.08.2011 Сообщений: 6,129 |
|
19.09.2021, 12:41 |
10 |
Student_9999999, лучше покажите содержимое папки: Код C:Program Files (x86)Microsoft Visual StudioShared Именно там ведь нугет не может найти локальный кэш. Добавлено через 1 минуту
локальный кэш Точнее fallback package folder.
0 |
11495 / 7838 / 1193 Регистрация: 21.01.2016 Сообщений: 29,388 |
|
19.09.2021, 12:42 |
11 |
Именно там ведь нугет не может найти локальный кэш. С чего там кеш оказаться должен?)
0 |
3094 / 2236 / 641 Регистрация: 02.08.2011 Сообщений: 6,129 |
|
19.09.2021, 12:43 |
12 |
С чего там кеш оказаться должен?) А я поправился, не надо.
0 |
Администратор 15655 / 12616 / 4999 Регистрация: 17.03.2014 Сообщений: 25,652 Записей в блоге: 1 |
|
19.09.2021, 12:44 |
13 |
Решение
Так? Да. Только непонятно зачем вы настройки F# прикрепили. Увы снова ничего криминального. Согласен с IamRain, пора смотреть папку
1 |
0 / 0 / 0 Регистрация: 11.10.2020 Сообщений: 24 |
|
19.09.2021, 12:52 [ТС] |
14 |
зачем вы настройки F# прикрепили Загадка…
Возможно там нет папки NuGet и достаточно будет её создать. Значит нужно создавать? Миниатюры
0 |
3094 / 2236 / 641 Регистрация: 02.08.2011 Сообщений: 6,129 |
|
19.09.2021, 12:57 |
15 |
Student_9999999, все верно, нужно создать.
1 |
0 / 0 / 0 Регистрация: 11.10.2020 Сообщений: 24 |
|
19.09.2021, 13:11 [ТС] |
16 |
IamRain, я создала пустую папку NuGet в папке Shared, но снова эта ошибка возникает
0 |
3094 / 2236 / 641 Регистрация: 02.08.2011 Сообщений: 6,129 |
|
19.09.2021, 13:14 |
17 |
Student_9999999, папка должна иметь имя
1 |
0 / 0 / 0 Регистрация: 11.10.2020 Сообщений: 24 |
|
19.09.2021, 13:19 [ТС] |
18 |
IamRain, OwenGlendower, Usaga, Вы мои солнышки, спасибо за неравнодушие! Да, все получилось) Теперь я продолжу учиться программировать
0 |
Проект проги полностью перекинул на другой комп, отредактировал там его (версии студии совпадают), потом перекинул обратно. Теперь не компилится. Выдает эту ошибку((
1>—— Сборка начата: проект: WindowsFormsApplication1, Конфигурация: Debug Any CPU ——
1>C:Program Files (x86)MSBuild14.0binMicrosoft.Common.CurrentVersion.targets(2718,5): error MSB4018: непредвиденная ошибка при выполнении задачи «GenerateResource».
1>C:Program Files (x86)MSBuild14.0binMicrosoft.Common.CurrentVersion.targets(2718,5): error MSB4018: System.NullReferenceException: Ссылка на объект не указывает на экземпляр объекта.
1>C:Program Files (x86)MSBuild14.0binMicrosoft.Common.CurrentVersion.targets(2718,5): error MSB4018: в Microsoft.Build.Tasks.ResGenDependencies.GetResXFileInfo(String resxFile)
1>C:Program Files (x86)MSBuild14.0binMicrosoft.Common.CurrentVersion.targets(2718,5): error MSB4018: в Microsoft.Build.Tasks.GenerateResource.ShouldRebuildResgenOutputFile(String sourceFilePath, String outputFilePath)
1>C:Program Files (x86)MSBuild14.0binMicrosoft.Common.CurrentVersion.targets(2718,5): error MSB4018: в Microsoft.Build.Tasks.GenerateResource.GetResourcesToProcess(List1& inputsToProcess, List
1& outputsToProcess, List`1& cachedOutputFiles)
1>C:Program Files (x86)MSBuild14.0binMicrosoft.Common.CurrentVersion.targets(2718,5): error MSB4018: в Microsoft.Build.Tasks.GenerateResource.Execute()
1>C:Program Files (x86)MSBuild14.0binMicrosoft.Common.CurrentVersion.targets(2718,5): error MSB4018: в Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
1>C:Program Files (x86)MSBuild14.0binMicrosoft.Common.CurrentVersion.targets(2718,5): error MSB4018: в Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()
Помогите, кто сталкивался с этим… Все что находил не подходило по стилистике
I try to build a solution with MSBuild command line (on a clean machine) when only Build Tools 2015, .NET developer pack and .NET SDK are installed I get following error:
C:Program Files (x86)MSBuild14.0binMicrosoft.Common.CurrentVersion.targets(2718,5): error MSB4018: The "GenerateResource" task failed unexpectedly.
C:Program Files (x86)MSBuild14.0binMicrosoft.Common.CurrentVersion.targets(2718,5): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object.
C:Program Files (x86)MSBuild14.0binMicrosoft.Common.CurrentVersion.targets(2718,5): error MSB4018: at Microsoft.Build.Tasks.ResGenDependencies.GetResXFileInfo(String resxFile)
C:Program Files (x86)MSBuild14.0binMicrosoft.Common.CurrentVersion.targets(2718,5): error MSB4018: at Microsoft.Build.Tasks.GenerateResource.ShouldRebuildResgenOutputFile(String sourceFilePath, String outputFilePath)
C:Program Files (x86)MSBuild14.0binMicrosoft.Common.CurrentVersion.targets(2718,5): error MSB4018: at Microsoft.Build.Tasks.GenerateResource.GetResourcesToProcess(List`1& inputsToProcess, List`1& outputsToProcess, List`1& cachedOutputFiles)
C:Program Files (x86)MSBuild14.0binMicrosoft.Common.CurrentVersion.targets(2718,5): error MSB4018: at Microsoft.Build.Tasks.GenerateResource.Execute()
C:Program Files (x86)MSBuild14.0binMicrosoft.Common.CurrentVersion.targets(2718,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
C:Program Files (x86)MSBuild14.0binMicrosoft.Common.CurrentVersion.targets(2718,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
What’s wrong?
- Remove From My Forums
-
Вопрос
-
непредвиденная ошибка при выполнении задачи «GenerateResource»
VS 2012 UPDATE 3
Ошибка 12
непредвиденная ошибка при выполнении задачи «GenerateResource».
System.Runtime.InteropServices.ExternalException (0x80004005): В GDI+ возникла ошибка общего вида.
в System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)
в System.Drawing.Image.Save(MemoryStream stream)
в System.Drawing.Image.System.Runtime.Serialization.ISerializable.GetObjectData(SerializationInfo si, StreamingContext context)
в System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter)
в System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter)
в System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
в System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
в System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph)
в System.Resources.ResourceWriter.WriteValue(ResourceTypeCode typeCode, Object value, BinaryWriter writer, IFormatter objFormatter)
в System.Resources.ResourceWriter.Generate()
в System.Resources.ResourceWriter.Dispose(Boolean disposing)
в System.Resources.ResourceWriter.Close()
в Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(IResourceWriter writer)
в Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(String filename)
в Microsoft.Build.Tasks.ProcessResourceFiles.ProcessFile(String inFile, String outFile)
в Microsoft.Build.Tasks.ProcessResourceFiles.Run(TaskLoggingHelper log, ITaskItem[] assemblyFilesList, ArrayList inputs, ArrayList outputs, Boolean sourcePath, String language, String namespacename, String resourcesNamespace, String filename, String classname,
Boolean publicClass)
в Microsoft.Build.Tasks.ProcessResourceFiles.Run(TaskLoggingHelper log, ITaskItem[] assemblyFilesList, ArrayList inputs, ArrayList outputs, Boolean sourcePath, String language, String namespacename, String resourcesNamespace, String filename, String classname,
Boolean publicClass)
в Microsoft.Build.Tasks.GenerateResource.Execute()
в Microsoft.Build.CommandLine.OutOfProcTaskAppDomainWrapperBase.InstantiateAndExecuteTask(IBuildEngine oopTaskHostNode, LoadedType taskType, String taskName, String taskLocation, String taskFile, Int32 taskLine, Int32 taskColumn, AppDomainSetup appDomainSetup,
IDictionary`2 taskParams)-
Изменено
25 сентября 2013 г. 3:06
-
Изменено
Ответы
-
-
Предложено в качестве ответа
Maksim MarinovMicrosoft contingent staff, Moderator
26 сентября 2013 г. 6:58 -
Помечено в качестве ответа
Maksim MarinovMicrosoft contingent staff, Moderator
30 сентября 2013 г. 7:24
-
Предложено в качестве ответа
Эта статья перенесена из:https://github.com/Microsoft/msbuild/issues/364
After uninstall Visual Studio 2015 Update 1 RC and reinstall VS 2015 RTM I can’t compile any of my projects any more. Following error occurs:
1>C:Program Files (x86)MSBuild14.0binMicrosoft.Common.CurrentVersion.targets(2718,5): error MSB4018: The "GenerateResource" task failed unexpectedly.
1>C:Program Files (x86)MSBuild14.0binMicrosoft.Common.CurrentVersion.targets(2718,5): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object.
https://github.com/Microsoft/msbuild/pull/314
This fixes the scenario of switching builds using RTM and Update 1.
Normal usage this should only be for an uninstall scenario since MSBuild is typically in the GAC,
but in cases of a checked in toolset or using the open source version we should be backwards compatible.
This is just renaming the fields back for the cache classes.
https://github.com/Microsoft/msbuild/pull/466
Update ResGen Serialization Compat for RTM and U1
602201c When reverting the CodeFormatter private field name changes (#314), the Dependencies class was missed. This causes an incompatibility going from Update 1 back to RTM and causes a null ref. This change fixes the compat issue (rename the field) and updates the serialization version to ensure U1 -> U2 works as expected.
Rename field for internal build.
c863538 Looks like the field was renamed for STANDALONEBUILD but not otherwise.Correcting this.
http://stackoverflow.com/questions/31608319/msbuild-error-msb4018-in-vs2015-the-link-task-failed-unexpectedly
I’ve managed to fix this issue myself and would like to document the solution here for future reference. The following error was caused by an empty XML element in the project file:
The empty element was accessed by the ‘Link’ task, which just failed:
Removing the respective element fixed the issue:
Hint: As it can be seen in other posts, many of the MSB4018 errors seem to be related to project files containing unexpected values. |
Another solution is to delete all generated files from the last build through an explorer window. Delete all files in: .Projectbin .Projectobj While you can «Clean» or «Rebuild» directly through Visual Studio, this only captures some of the files. By forcing to recompile all files, all memory locations will now correctly align and the issue should be resolved. |
https://blogs.msdn.microsoft.com/visualstudio/2013/07/24/msbuild-is-now-part-of-visual-studio/?replytocom=73743
MSBuild and its Toolset now Version with Visual Studio
Перепечатано: https://www.cnblogs.com/freeeliver54/p/6692806.html