With the release of Visual Studio 2015 came the (final) release of the Roslyn C# compiler and C# 6. This latest version of C#’s feature list seems to be…less than exciting, but it’s important to keep in mind that before Roslyn, none of these new features would have ever made it into a release. It was simply too hard to add a feature in C#, so higher impact/value features made it in while minor annoyances/enhancements would be deferred, indefinitely
وضعیت PWAها در سال 2021
ASP.NET Core in .NET 8 is your complete solution for modern web development. It handles all of your web development needs from the frontend to the backend. You can build beautiful, richly interactive web experiences with Blazor, and high-performance backend APIs and services that are reliable and secure. ASP.NET Core in .NET 8 is perfect for building cloud-native apps, and great tooling in Visual Studio and Visual Studio Code supercharges your productivity. With ASP.NET Core in .NET 8, every developer is a full stack developer!
روش ایجاد یک پروژهی کتابخانهای، از کامپوننتهای Blazor
اگر از ویژوال استودیو استفاده میکنید، نوع «Razor Class Library»، پروژههای مخصوص کتابخانههای کامپوننتهای Blazor را آغاز میکند و اگر میخواهید از CLI استفاده کنید، باید از دستور «dotnet new razorclasslib» استفاده کرد؛ که قابلیت تبدیل به بستههای نیوگت را با دستور dotnet pack داشته و به این ترتیب میتوان آنها را به اشتراک گذاشت و یا حتی میتوان ارجاعی از این پروژه را در سایر پروژههای شخصی، مورد استفاده قرار داد.
ساختار پیشفرض فایل csproj اینگونه پروژهها به صورت زیر است:
<Project Sdk="Microsoft.NET.Sdk.Razor"> <PropertyGroup> <TargetFramework>net5.0</TargetFramework> </PropertyGroup> <ItemGroup> <SupportedPlatform Include="browser" /> </ItemGroup> <ItemGroup> <PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="5.0.6" /> </ItemGroup> </Project>
روش افزودن فایلهای ثابت مورد استفادهی در کتابخانه
پروژهی پیشفرضی که در اینجا ایجاد میشود، به همراه یک پوشهی wwwroot نیز هست. این پوشه محلی است که باید فایلهای ثابت اشتراکی پروژه را مانند فایلهای CSS و JS مورد استفاده، قرار داد.
این نوع پروژهها از ویژگی Isolated CSS و یا Isolated JS ارائه شدهی در Blazor 5x نیز پشتیبانی میکنند.
روش استفادهی از فایلهای ثابت موجود در یک کتابخانه
این فایلهای ثابت به همراه بستهی نهایی پروژه، به صورت خودکار توزیع میشوند (و نیازی به ارائهی مجزای آنها نیست) و برای استفادهی از آنها در پروژههای دیگر، باید از روش مسیردهی زیر استفاده کرد:
/_content/PackageId/MyImage.png
- PackageId عموما همان نام پروژهی مورد استفادهاست (نام فایل csproj مانند MyBlazorComponentLibrary). هرچند میتوان آنرا به صورت مجزایی در فایل csproj نیز مقدار دهی کرد.
- در این مثال MyImage.png، نام منبعی است که قرار است از آن استفاده کنیم و پیشتر در پوشهی wwwroot کتابخانه، کپی شدهاست و یا حتی میتوان زیر پوشههایی را نیز در اینجا ایجاد و از آنها استفاده کرد؛ مانند:
/_content/MyBlazorComponentLibrary/scripts/HelloWorld.js
<script src="_content/MyBlazorComponentLibrary/exampleJsInterop.js"></script>
روش استفادهی از کتابخانهی نهایی تولید شده
برای استفادهی از کتابخانهی نهایی تولید شده یا میتوان ارجاعی را به فایل csproj آن، به پروژهی خود افزود:
<ItemGroup> <ProjectReference Include="..\MyBlazorComponentLibrary\MyBlazorComponentLibrary.csproj" /> </ItemGroup>
پس از آن، جهت سهولت استفادهی از این کامپوننتهای اشتراکی، بهتر است فضای نام آنها را به فایل Imports.razor_ پروژهی خود افزود؛ تا نیازی به تعریف آنها در تمام کامپوننتهای مورد استفاده نباشد.
- Windows 11 SDK support.
- Adds Xcode 13.0 support.
- Add AMD64 math functions to ARM64X CRT.
- Updates to the ARM64 and ARM64EC interfaces between the binary and the POGO instrumentation runtime.
- Fixed several problems with IntelliSense responsiveness and correctness affecting C++20 concepts, ranges, and abbreviated function templates.
- Fixed a false positive in local lifetime checks.
- Corrected an issue where arrays allocated with a constant of size > 32bits could allocate less memory than requested.
- Ensures that ATL string initialization occurs during static variable initialization, in the default AppDomain.
- Fixed a bug in C++ Concurrency::parallel_for_each that was crashing the calling process due to integer overflow.
- Fixed a bug in the STL's iterator debugging machinery that could cause crashes in multithreaded programs using STL containers.
- We have fixed a fatal internal compiler error caused by unnamed structs whose fields are referenced from SAL annotations.
- Fixes a rare crash when analyzing templated code that uses __uuidof.
- Fixed an issue that caused C++ static analysis results to sometimes not display correctly in the FixIt action.
- Fixed opening .uitest extension files in Coded UI project
- Fire component change events for non-component objects also in WinForms .NET designer
- Fix for crash on deleting ContextMenuStrip control in Windows Forms .NET designer.
- Guard against crashes when the Windows Forms designer reloads when dragging.
- Fix for intermittent VS crash while interacting with WinForms .NET designer during solution or project rebuild.
- Fixed a bug causing .NET 5 projects to be reported as out of date when they should have been up to date, causing slower builds.
- Automatically disable asset-indexing for large scale Unity projects.
- This release fixes an issue with deploying certain Windows Application Packaging projects where deployment is unnecessarily copying unmodified files.
ASP.NET Core 3.1 Preview 3 منتشر شد
I was pleasantly surprised by how easy it was to setup and install ASP.NET Core 2.1 on Linux. I did it for the first time in 15 minutes with no previous experience with .NET Core on Linux. I did it the second time, in production, in 5 minutes by following these instructions.
In this article, I show you how to install the .NET Core runtime on CentOS, how to get a sample ASP.NET Core project running on Kestrel as a service for reliability, and how to configure both the code and the firewall to enable remote access. Finally, I discuss what I would do differently for actual production usage.
عدم اجرای درست پس از بروزرسانی
بنده فایل پروژه را دریافت 3.14mb کردم - با VS2012 پروژه را باز کردم.
تمامی بسته ای مورد نیاز را از nuget دریافت نموده و به پروژه اضافه کردم. با توجه به بروزرسانی کامل پروژه در هنگام build کردن با خطای ذیل برخوردم :
Error 1 Running transformation: System.Runtime.Serialization.SerializationException: Type 'Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowBase' in Assembly 'Microsoft.VisualStudio.Platform.WindowManagement, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not marked as serializable.
Server stack trace:
at System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type)
at System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context)
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo()
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
at System.Runtime.Remoting.Channels.CrossAppDomainSerializer.SerializeMessageParts(ArrayList argsToSerialize)
at System.Runtime.Remoting.Messaging.SmuggledMethodReturnMessage..ctor(IMethodReturnMessage mrm)
at System.Runtime.Remoting.Messaging.SmuggledMethodReturnMessage.SmuggleIfPossible(IMessage msg)
at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoDispatch(Byte[] reqStmBuff, SmuggledMethodCallMessage smuggledMcm, SmuggledMethodReturnMessage& smuggledMrm)
at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoTransitionDispatchCallback(Object[] args)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at EnvDTE.ProjectItem.Open(String ViewKind)
at Microsoft.VisualStudio.TextTemplating68537376E7602BEF0BC78F6865AE7CA51045AC19A14311A88D27E9D58C4AD4FF79D1048D4111C0DB61E161576D974579F27F8615BF9334E571707272502A1653.GeneratedTextTransformation.XmlSettings.Init(ITextTemplatingEngineHost host) in d:\Downloads\ASP.NET MVC\IRISCMS\Iris\Iris.Web\T4MVC.tt:line 2129
at Microsoft.VisualStudio.TextTemplating68537376E7602BEF0BC78F6865AE7CA51045AC19A14311A88D27E9D58C4AD4FF79D1048D4111C0DB61E161576D974579F27F8615BF9334E571707272502A1653.GeneratedTextTransformation.XmlSettings.Load[T](ITextTemplatingEngineHost host) in d:\Downloads\ASP.NET MVC\IRISCMS\Iris\Iris.Web\T4MVC.tt:line 2102
at Microsoft.VisualStudio.TextTemplating68537376E7602BEF0BC78F6865AE7CA51045AC19A14311A88D27E9D58C4AD4FF79D1048D4111C0DB61E161576D974579F27F8615BF9334E571707272502A1653.GeneratedTextTransformation.MvcSettings.Load(ITextTemplatingEngineHost host) in d:\Downloads\ASP.NET MVC\IRISCMS\Iris\Iris.Web\T4MVC.tt:line 1795
at Microsoft.VisualStudio.TextTemplating68537376E7602BEF0BC78F6865AE7CA51045AC19A14311A88D27E9D58C4AD4FF79D1048D4111C0DB61E161576D974579F27F8615BF9334E571707272502A1653.GeneratedTextTransformation.TransformText() in d:\Downloads\ASP.NET MVC\IRISCMS\Iris\Iris.Web\T4MVC.tt:line 39 d:\Downloads\ASP.NET MVC\IRISCMS\Iris\Iris.Web\T4MVC.tt 2129 1 Iris.Web
و یک خطای دیگر نیز دارم :
Error 2 The type or namespace name 'Extensibility' does not exist in the namespace 'MvcSiteMapProvider' (are you missing an assembly reference?)
هر کاری کردم نتونستم مشکل را حل کنم :
پیشنهاد :
1 -فایل کامل را در یکی از سایتهای اشتراک فایل مانند mediafire.com , uploadbaz بارگذاری و لینک دانلود را در بخش دانلود فایلهای قراردهید.
2-راهنمایی ، جهت رفع مشکلات فوق را ارائه فرمائید.
TypeScript 4.2 منتشر شد
Let’s take a look at what’s in store for TypeScript 4.2!
- Smarter Type Alias Preservation
- Leading/Middle Rest Elements in Tuple Types
- Stricter Checks For The
in
Operator -
--noPropertyAccessFromIndexSignature
-
abstract
Construct Signatures - The
--explainFiles
Flag - Improved Uncalled Function Checks in Logical Expressions
- Destructured Variables Can Be Explicitly Marked as Unused
- Relaxed Rules Between Optional Properties and String Index Signatures
- Declare Missing Helper Function
- Breaking Changes