параметр "10" для /langversion. Используйте "/langversion:?" для вывода списка поддерживаемых значений.
<LangVersion>10</LangVersion> - на данный момент
На прошлом ноутбуке было все норм.
Что не так?
Проект на .net48
Мои SDK .net:
2.1.202 [C:\Program Files\dotnet\sdk]
5.0.415 [C:\Program Files\dotnet\sdk]
6.0.408 [C:\Program Files\dotnet\sdk]
7.0.302 [C:\Program Files\dotnet\sdk]
Мои SDK netFramework:
net4.5
net4.8
Что нужно установить чтобы все работало, менять версию языка вниз не могу,так как при написании проекта использовал функции языка версии 10
.net48 не поддерживает C# 10
Я пол года писал на нем)
Почему все раньше работало)
может это было не в этом проекте где таргет фреймворк это 4.8?
нет, я работал в проекте 4.8 пол года, на 10 версии языка. Все было норм. Вчера новый комп купил и все поставил, копирую из гита проект , запускаю и ошибка)
ох уж эти сказочки. ох уж эти сказочники...
давай покажи ошибки какие при компиляции вываливаются. может IsExternalInit бахнуть и заведется
0>------- Started building project: SibaluxPanel.Plugin 0>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Roslyn\csc.exe /noconfig /nowarn:1701,1702,2008 /fullpaths /nostdlib+ /platform:x64 /define:R22;DEBUG /errorendlocation /preferreduilang:ru-RU /highentropyva+ /reference:"C:\Program Files\Autodesk\Revit 2022\AdWindows.dll" /reference:C:\Users\Chamion\ChamionRepo\BIMDATA\sibaluxpanel\packages\ControlzEx.4.4.0\lib\net462\ControlzEx.dll /reference:C:\Users\Chamion\ChamionRepo\BIMDATA\sibaluxpanel\packages\MahApps.Metro.2.4.9\lib\net47\MahApps.Metro.dll /reference:C:\Users\Chamion\ChamionRepo\BIMDATA\sibaluxpanel\packages\MathNet.Numerics.4.9.1\lib\net461\MathNet.Numerics.dll /reference:C:\Users\Chamion\ChamionRepo\BIMDATA\sibaluxpanel\packages\MathNet.Spatial.0.6.0\lib\net461\MathNet.Spatial.dll /reference:C:\Users\Chamion\ChamionRepo\BIMDATA\sibaluxpanel\packages\Microsoft.Bcl.AsyncInterfaces.7.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\Microsoft.CSharp.dll" /reference:C:\Users\Chamion\ChamionRepo\BIMDATA\sibaluxpanel\packages\Microsoft.Extensions.DependencyInjection.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll /reference:C:\Users\Chamion\ChamionRepo\BIMDATA\sibaluxpanel\packages\Microsoft.Extensions.DependencyInjection.7.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.dll /reference:C:\Users\Chamion\ChamionRepo\BIMDATA\sibaluxpanel\packages\Microsoft.Toolkit.Mvvm.7.1.2\lib\netstandard2.0\Microsoft.Toolkit.Mvvm.dll /reference:"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\PublicAssemblies\Microsoft.Windows.Design.Extensibility.dll" /reference:C:\Users\Chamion\ChamionRepo\BIMDATA\sibaluxpanel\packages\Microsoft.Xaml.Behaviors.Wpf.1.1.19\lib\net45\Microsoft.Xaml.Behaviors.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\mscorlib.dll" /reference:C:\Users\Chamion\ChamionRepo\BIMDATA\sibaluxpanel\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\PresentationCore.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\PresentationFramework.dll" /reference:"C:\Program Files\Autodesk\Revit 2022\RevitAPI.dll" /reference:"C:\Program Files\Autodesk\Revit 2022\RevitAPIUI.dll" /reference:C:\Users\Chamion\ChamionRepo\BIMDATA\sibaluxpanel\packages\Serilog.2.12.0\lib\net47\Serilog.dll /reference:C:\Users\Chamion\ChamionRepo\BIMDATA\sibaluxpanel\packages\Serilog.Sinks.File.5.0.0\lib\net45\Serilog.Sinks.File.dll /reference:C:\Users\Chamion\ChamionRepo\BIMDATA\sibaluxpanel\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll /reference:C:\Users\Chamion\ChamionRepo\BIMDATA\sibaluxpanel\packages\System.ComponentModel.Annotations.5.0.0\lib\net461\System.ComponentModel.Annotations.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.ComponentModel.DataAnnotations.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Configuration.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Drawing.dll" /reference:C:\Users\Chamion\ChamionRepo\BIMDATA\sibaluxpanel\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Numerics.dll"
/reference:C:\Users\Chamion\ChamionRepo\BIMDATA\sibaluxpanel\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll /reference:C:\Users\Chamion\ChamionRepo\BIMDATA\sibaluxpanel\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Runtime.Serialization.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Security.dll" /reference:C:\Users\Chamion\ChamionRepo\BIMDATA\sibaluxpanel\packages\System.Text.Encodings.Web.7.0.0\lib\net462\System.Text.Encodings.Web.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\Facades\System.Threading.Tasks.dll" /reference:C:\Users\Chamion\ChamionRepo\BIMDATA\sibaluxpanel\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll /reference:C:\Users\Chamion\ChamionRepo\BIMDATA\sibaluxpanel\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Web.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Web.Extensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Xaml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Xml.dll" /reference:"C:\Program Files\Autodesk\Revit 2022\UIFramework.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\WindowsBase.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\Facades\netstandard.dll" /debug+ /debug:full /filealign:512 /out:"obj\Debug R22\SibaluxPanel2022.dll" /subsystemversion:6.00 /target:library /utf8output /deterministic+ /langversion:10.0 Core\Enums\LayoutPanelsType.cs Core\Enums\PanelType.cs Core\Factories\FacadePartModelFactory.cs Core\Messenger\Messages\AddChildrenMessage.cs Core\Messenger\Messenger.cs Core\Models\Export\ExportPanelModel.cs Core\Models\Geometry\CustomLine.cs Core\Models\Geometry\CustomLineViewModel.cs Core\Models\Geometry\CustomPoint.cs Core\Models\Geometry\CustomPointViewModel.cs Core\Models\Geometry\CustomPolygon.cs Core\Models\Geometry\CustomPolygonViewModel.cs Core\Models\Selection\FacadePartModel.cs Core\Models\Selection\FacadeViewModel.cs Core\Models\Selection\InsertedInstanceModel.cs Core\Models\Settings\SettingMementoDto.cs Core\SelectionFilter\FacadeFaceSelectionFilter.cs Core\Services\AssemblyResourceService\AssemblyResourceService.cs Core\Services\DialogServices\IDialogService.cs Core\Services\DialogServices\XlsxDialogService.cs Core\Services\LoggerConfiguratorService\LoggerConfiguratorService.cs Core\Services\ProgressViewService\ProgressViewService.cs Core\Services\RevitContextService\RevitContextService.cs Core\Services\RevitContextService\RevitContextServiceEventHandler.cs Core\Services\RevitGeometryService\RevitGeometryService.cs Core\Services\RevitSelectService\RevitSelectService.cs Core\Services\SettingSaveService\SettingsService.cs Core\Services\SibaluxApplicationControlService\ISibaluxApplicationControlService.cs Core\Services\SibaluxApplicationControlService\SibaluxApplicationControlService.cs Core\Services\UiComponentCreateService\IUiComponentCreateService.cs Core\Services\UiComponentCreateService\UiComponentCreateService.cs Core\Services\UniqueNameService\UniqueNameService.cs Core\Services\ViewIsOpenProvideService\ViewIsOpenProvideService.cs Core\Services\WorkImitateService\WorkImitateService.cs Core\Services\WpfGeometryService\WpfGeometryService.cs Core\Stores\CommandDataStore.cs Core\Stores\NavigationStore.cs ExternalCommands\RunUiExternalCommand.cs Properties\AssemblyInfo.cs Properties\Resources.Designer.cs SibaluxApplication.cs ViewModels\MainProgressViewModel.cs ViewModels\MainUiViewModel.cs ViewModels\ReportViewModel.cs
ок поставь LangVersion в preview
Обсуждают сегодня